hpm_mcan_regs.h 132 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583
  1. /*
  2. * Copyright (c) 2021-2023 HPMicro
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. *
  6. */
  7. #ifndef HPM_MCAN_H
  8. #define HPM_MCAN_H
  9. typedef struct {
  10. __R uint8_t RESERVED0[4]; /* 0x0 - 0x3: Reserved */
  11. __R uint32_t ENDN; /* 0x4: endian register */
  12. __R uint8_t RESERVED1[4]; /* 0x8 - 0xB: Reserved */
  13. __RW uint32_t DBTP; /* 0xC: data bit timing and prescaler, writeable when CCCR.CCE and CCCR.INT are set */
  14. __RW uint32_t TEST; /* 0x10: test register */
  15. __RW uint32_t RWD; /* 0x14: ram watchdog */
  16. __RW uint32_t CCCR; /* 0x18: CC control register */
  17. __RW uint32_t NBTP; /* 0x1C: nominal bit timing and prescaler register */
  18. __RW uint32_t TSCC; /* 0x20: timestamp counter configuration */
  19. __R uint32_t TSCV; /* 0x24: timestamp counter value */
  20. __RW uint32_t TOCC; /* 0x28: timeout counter configuration */
  21. __R uint32_t TOCV; /* 0x2C: timeout counter value */
  22. __R uint8_t RESERVED2[16]; /* 0x30 - 0x3F: Reserved */
  23. __R uint32_t ECR; /* 0x40: error counter register */
  24. __R uint32_t PSR; /* 0x44: protocol status register */
  25. __RW uint32_t TDCR; /* 0x48: transmitter delay compensation */
  26. __R uint8_t RESERVED3[4]; /* 0x4C - 0x4F: Reserved */
  27. __RW uint32_t IR; /* 0x50: interrupt register */
  28. __RW uint32_t IE; /* 0x54: interrupt enable */
  29. __RW uint32_t ILS; /* 0x58: interrupt line select */
  30. __RW uint32_t ILE; /* 0x5C: interrupt line enable */
  31. __R uint8_t RESERVED4[32]; /* 0x60 - 0x7F: Reserved */
  32. __RW uint32_t GFC; /* 0x80: global filter configuration */
  33. __RW uint32_t SIDFC; /* 0x84: standard ID filter configuration */
  34. __RW uint32_t XIDFC; /* 0x88: extended ID filter configuration */
  35. __R uint8_t RESERVED5[4]; /* 0x8C - 0x8F: Reserved */
  36. __RW uint32_t XIDAM; /* 0x90: extended id and mask */
  37. __R uint32_t HPMS; /* 0x94: high priority message status */
  38. __RW uint32_t NDAT1; /* 0x98: new data1 */
  39. __RW uint32_t NDAT2; /* 0x9C: new data2 */
  40. __RW uint32_t RXF0C; /* 0xA0: rx fifo 0 configuration */
  41. __R uint32_t RXF0S; /* 0xA4: rx fifo 0 status */
  42. __RW uint32_t RXF0A; /* 0xA8: rx fifo0 acknowledge */
  43. __RW uint32_t RXBC; /* 0xAC: rx buffer configuration */
  44. __RW uint32_t RXF1C; /* 0xB0: rx fifo1 configuration */
  45. __R uint32_t RXF1S; /* 0xB4: rx fifo1 status */
  46. __RW uint32_t RXF1A; /* 0xB8: rx fifo 1 acknowledge */
  47. __RW uint32_t RXESC; /* 0xBC: rx buffer/fifo element size configuration */
  48. __RW uint32_t TXBC; /* 0xC0: tx buffer configuration */
  49. __R uint32_t TXFQS; /* 0xC4: tx fifo/queue status */
  50. __RW uint32_t TXESC; /* 0xC8: tx buffer element size configuration */
  51. __R uint32_t TXBRP; /* 0xCC: tx buffer request pending */
  52. __RW uint32_t TXBAR; /* 0xD0: tx buffer add request */
  53. __RW uint32_t TXBCR; /* 0xD4: tx buffer cancellation request */
  54. __R uint32_t TXBTO; /* 0xD8: tx buffer transmission occurred */
  55. __R uint32_t TXBCF; /* 0xDC: tx buffer cancellation finished */
  56. __RW uint32_t TXBTIE; /* 0xE0: tx buffer transmission interrupt enable */
  57. __RW uint32_t TXBCIE; /* 0xE4: tx buffer cancellation finished interrupt enable */
  58. __R uint8_t RESERVED6[8]; /* 0xE8 - 0xEF: Reserved */
  59. __RW uint32_t TXEFC; /* 0xF0: tx event fifo configuration */
  60. __R uint32_t TXEFS; /* 0xF4: tx event fifo status */
  61. __RW uint32_t TXEFA; /* 0xF8: tx event fifo acknowledge */
  62. __R uint8_t RESERVED7[260]; /* 0xFC - 0x1FF: Reserved */
  63. __R uint32_t TS_SEL[16]; /* 0x200 - 0x23C: timestamp 0-15 */
  64. __R uint32_t CREL; /* 0x240: core release register */
  65. __RW uint32_t TSCFG; /* 0x244: timestamp configuration */
  66. __R uint32_t TSS1; /* 0x248: timestamp status1 */
  67. __R uint32_t TSS2; /* 0x24C: timestamp status2 */
  68. __R uint32_t ATB; /* 0x250: actual timebase */
  69. __R uint32_t ATBH; /* 0x254: actual timebase high */
  70. __R uint8_t RESERVED8[424]; /* 0x258 - 0x3FF: Reserved */
  71. __RW uint32_t GLB_CTL; /* 0x400: global control */
  72. __R uint32_t GLB_STATUS; /* 0x404: global status */
  73. __R uint8_t RESERVED9[7160]; /* 0x408 - 0x1FFF: Reserved */
  74. __RW uint32_t MESSAGE_BUFF[640]; /* 0x2000 - 0x29FC: message buff */
  75. } MCAN_Type;
  76. /* Bitfield definition for register: ENDN */
  77. /*
  78. * EVT (R)
  79. *
  80. * Endianness Test Value
  81. * The endianness test value is 0x87654321.
  82. */
  83. #define MCAN_ENDN_EVT_MASK (0xFFFFFFFFUL)
  84. #define MCAN_ENDN_EVT_SHIFT (0U)
  85. #define MCAN_ENDN_EVT_GET(x) (((uint32_t)(x) & MCAN_ENDN_EVT_MASK) >> MCAN_ENDN_EVT_SHIFT)
  86. /* Bitfield definition for register: DBTP */
  87. /*
  88. * TDC (RW)
  89. *
  90. * transmitter delay compensation enable
  91. * 0= Transmitter Delay Compensation disabled
  92. * 1= Transmitter Delay Compensation enabled
  93. */
  94. #define MCAN_DBTP_TDC_MASK (0x800000UL)
  95. #define MCAN_DBTP_TDC_SHIFT (23U)
  96. #define MCAN_DBTP_TDC_SET(x) (((uint32_t)(x) << MCAN_DBTP_TDC_SHIFT) & MCAN_DBTP_TDC_MASK)
  97. #define MCAN_DBTP_TDC_GET(x) (((uint32_t)(x) & MCAN_DBTP_TDC_MASK) >> MCAN_DBTP_TDC_SHIFT)
  98. /*
  99. * DBRP (RW)
  100. *
  101. * Data Bit Rate Prescaler
  102. * The value by which the oscillator frequency is divided for generating the bit time quanta. The bit time is built up from a multiple of this quanta. Valid values for the Bit Rate Prescaler are 0 to 31. When TDC = ‘1’, the range is limited to 0,1. The actual interpretation by the hardware of this value is such that one more than the value programmed here is used.
  103. */
  104. #define MCAN_DBTP_DBRP_MASK (0x1F0000UL)
  105. #define MCAN_DBTP_DBRP_SHIFT (16U)
  106. #define MCAN_DBTP_DBRP_SET(x) (((uint32_t)(x) << MCAN_DBTP_DBRP_SHIFT) & MCAN_DBTP_DBRP_MASK)
  107. #define MCAN_DBTP_DBRP_GET(x) (((uint32_t)(x) & MCAN_DBTP_DBRP_MASK) >> MCAN_DBTP_DBRP_SHIFT)
  108. /*
  109. * DTSEG1 (RW)
  110. *
  111. * Data time segment before sample point
  112. * Valid values are 0 to 31. The actual interpretation by the hardware of this value is such that one more than the programmed value is used.
  113. */
  114. #define MCAN_DBTP_DTSEG1_MASK (0x1F00U)
  115. #define MCAN_DBTP_DTSEG1_SHIFT (8U)
  116. #define MCAN_DBTP_DTSEG1_SET(x) (((uint32_t)(x) << MCAN_DBTP_DTSEG1_SHIFT) & MCAN_DBTP_DTSEG1_MASK)
  117. #define MCAN_DBTP_DTSEG1_GET(x) (((uint32_t)(x) & MCAN_DBTP_DTSEG1_MASK) >> MCAN_DBTP_DTSEG1_SHIFT)
  118. /*
  119. * DTSEG2 (RW)
  120. *
  121. * Data time segment after sample point
  122. * Valid values are 0 to 15. The actual interpretation by the hardware of this value is such that one more than the programmed value is used.
  123. */
  124. #define MCAN_DBTP_DTSEG2_MASK (0xF0U)
  125. #define MCAN_DBTP_DTSEG2_SHIFT (4U)
  126. #define MCAN_DBTP_DTSEG2_SET(x) (((uint32_t)(x) << MCAN_DBTP_DTSEG2_SHIFT) & MCAN_DBTP_DTSEG2_MASK)
  127. #define MCAN_DBTP_DTSEG2_GET(x) (((uint32_t)(x) & MCAN_DBTP_DTSEG2_MASK) >> MCAN_DBTP_DTSEG2_SHIFT)
  128. /*
  129. * DSJW (RW)
  130. *
  131. * Data (Re)Synchronization Jump Width
  132. * Valid values are 0 to 15. The actual interpretation by the hardware of this value is such that one more than the value programmed here is used.
  133. */
  134. #define MCAN_DBTP_DSJW_MASK (0xFU)
  135. #define MCAN_DBTP_DSJW_SHIFT (0U)
  136. #define MCAN_DBTP_DSJW_SET(x) (((uint32_t)(x) << MCAN_DBTP_DSJW_SHIFT) & MCAN_DBTP_DSJW_MASK)
  137. #define MCAN_DBTP_DSJW_GET(x) (((uint32_t)(x) & MCAN_DBTP_DSJW_MASK) >> MCAN_DBTP_DSJW_SHIFT)
  138. /* Bitfield definition for register: TEST */
  139. /*
  140. * SVAL (R)
  141. *
  142. * Started Valid
  143. * 0= Value of TXBNS not valid
  144. * 1= Value of TXBNS valid
  145. */
  146. #define MCAN_TEST_SVAL_MASK (0x200000UL)
  147. #define MCAN_TEST_SVAL_SHIFT (21U)
  148. #define MCAN_TEST_SVAL_GET(x) (((uint32_t)(x) & MCAN_TEST_SVAL_MASK) >> MCAN_TEST_SVAL_SHIFT)
  149. /*
  150. * TXBNS (R)
  151. *
  152. * Tx Buffer Number Started
  153. * Tx Buffer number of message whose transmission was started last. Valid when SVAL is set. Valid values are 0 to 31.
  154. */
  155. #define MCAN_TEST_TXBNS_MASK (0x1F0000UL)
  156. #define MCAN_TEST_TXBNS_SHIFT (16U)
  157. #define MCAN_TEST_TXBNS_GET(x) (((uint32_t)(x) & MCAN_TEST_TXBNS_MASK) >> MCAN_TEST_TXBNS_SHIFT)
  158. /*
  159. * PVAL (R)
  160. *
  161. * Prepared Valid
  162. * 0= Value of TXBNP not valid
  163. * 1= Value of TXBNP valid
  164. */
  165. #define MCAN_TEST_PVAL_MASK (0x2000U)
  166. #define MCAN_TEST_PVAL_SHIFT (13U)
  167. #define MCAN_TEST_PVAL_GET(x) (((uint32_t)(x) & MCAN_TEST_PVAL_MASK) >> MCAN_TEST_PVAL_SHIFT)
  168. /*
  169. * TXBNP (R)
  170. *
  171. * Tx Buffer Number Prepared
  172. * Tx Buffer number of message that is ready for transmission. Valid when PVAL is set.Valid values are 0 to 31.
  173. */
  174. #define MCAN_TEST_TXBNP_MASK (0x1F00U)
  175. #define MCAN_TEST_TXBNP_SHIFT (8U)
  176. #define MCAN_TEST_TXBNP_GET(x) (((uint32_t)(x) & MCAN_TEST_TXBNP_MASK) >> MCAN_TEST_TXBNP_SHIFT)
  177. /*
  178. * RX (R)
  179. *
  180. * Receive Pin
  181. * Monitors the actual value of pin m_can_rx
  182. * 0= The CAN bus is dominant (m_can_rx = ‘0’)
  183. * 1= The CAN bus is recessive (m_can_rx = ‘1’)
  184. */
  185. #define MCAN_TEST_RX_MASK (0x80U)
  186. #define MCAN_TEST_RX_SHIFT (7U)
  187. #define MCAN_TEST_RX_GET(x) (((uint32_t)(x) & MCAN_TEST_RX_MASK) >> MCAN_TEST_RX_SHIFT)
  188. /*
  189. * TX (RW)
  190. *
  191. * Control of Transmit Pin
  192. * 00 Reset value, m_can_tx controlled by the CAN Core, updated at the end of the CAN bit time
  193. * 01 Sample Point can be monitored at pin m_can_tx
  194. * 10 Dominant (‘0’) level at pin m_can_tx
  195. * 11 Recessive (‘1’) at pin m_can_tx
  196. */
  197. #define MCAN_TEST_TX_MASK (0x60U)
  198. #define MCAN_TEST_TX_SHIFT (5U)
  199. #define MCAN_TEST_TX_SET(x) (((uint32_t)(x) << MCAN_TEST_TX_SHIFT) & MCAN_TEST_TX_MASK)
  200. #define MCAN_TEST_TX_GET(x) (((uint32_t)(x) & MCAN_TEST_TX_MASK) >> MCAN_TEST_TX_SHIFT)
  201. /*
  202. * LBCK (RW)
  203. *
  204. * Loop Back Mode
  205. * 0= Reset value, Loop Back Mode is disabled
  206. * 1= Loop Back Mode is enabled
  207. */
  208. #define MCAN_TEST_LBCK_MASK (0x10U)
  209. #define MCAN_TEST_LBCK_SHIFT (4U)
  210. #define MCAN_TEST_LBCK_SET(x) (((uint32_t)(x) << MCAN_TEST_LBCK_SHIFT) & MCAN_TEST_LBCK_MASK)
  211. #define MCAN_TEST_LBCK_GET(x) (((uint32_t)(x) & MCAN_TEST_LBCK_MASK) >> MCAN_TEST_LBCK_SHIFT)
  212. /* Bitfield definition for register: RWD */
  213. /*
  214. * WDV (R)
  215. *
  216. * Watchdog Value
  217. * Actual Message RAM Watchdog Counter Value.
  218. */
  219. #define MCAN_RWD_WDV_MASK (0xFF00U)
  220. #define MCAN_RWD_WDV_SHIFT (8U)
  221. #define MCAN_RWD_WDV_GET(x) (((uint32_t)(x) & MCAN_RWD_WDV_MASK) >> MCAN_RWD_WDV_SHIFT)
  222. /*
  223. * WDC (RW)
  224. *
  225. * Watchdog Configuration
  226. * Start value of the Message RAM Watchdog Counter. With the reset value of “00” the counter is disabled.
  227. */
  228. #define MCAN_RWD_WDC_MASK (0xFFU)
  229. #define MCAN_RWD_WDC_SHIFT (0U)
  230. #define MCAN_RWD_WDC_SET(x) (((uint32_t)(x) << MCAN_RWD_WDC_SHIFT) & MCAN_RWD_WDC_MASK)
  231. #define MCAN_RWD_WDC_GET(x) (((uint32_t)(x) & MCAN_RWD_WDC_MASK) >> MCAN_RWD_WDC_SHIFT)
  232. /* Bitfield definition for register: CCCR */
  233. /*
  234. * NISO (RW)
  235. *
  236. * Non ISO Operation
  237. * If this bit is set, the M_CAN uses the CAN FD frame format as specified by the Bosch CAN FD
  238. * Specification V1.0.
  239. * 0= CAN FD frame format according to ISO 11898-1:2015
  240. * 1= CAN FD frame format according to Bosch CAN FD Specification V1.0
  241. * Note: When the generic parameter iso_only_g is set to ‘1’ in hardware synthesis, this bit becomes reserved and is read as ‘0’. The M_CAN always operates with the CAN FD frame format according to ISO 11898-1:2015.
  242. */
  243. #define MCAN_CCCR_NISO_MASK (0x8000U)
  244. #define MCAN_CCCR_NISO_SHIFT (15U)
  245. #define MCAN_CCCR_NISO_SET(x) (((uint32_t)(x) << MCAN_CCCR_NISO_SHIFT) & MCAN_CCCR_NISO_MASK)
  246. #define MCAN_CCCR_NISO_GET(x) (((uint32_t)(x) & MCAN_CCCR_NISO_MASK) >> MCAN_CCCR_NISO_SHIFT)
  247. /*
  248. * TXP (RW)
  249. *
  250. * Transmit Pause
  251. * If this bit is set, the M_CAN pauses for two CAN bit times before starting the next transmission after
  252. * itself has successfully transmitted a frame (see Section 3.5).
  253. * 0= Transmit pause disabled
  254. * 1= Transmit pause enabled
  255. */
  256. #define MCAN_CCCR_TXP_MASK (0x4000U)
  257. #define MCAN_CCCR_TXP_SHIFT (14U)
  258. #define MCAN_CCCR_TXP_SET(x) (((uint32_t)(x) << MCAN_CCCR_TXP_SHIFT) & MCAN_CCCR_TXP_MASK)
  259. #define MCAN_CCCR_TXP_GET(x) (((uint32_t)(x) & MCAN_CCCR_TXP_MASK) >> MCAN_CCCR_TXP_SHIFT)
  260. /*
  261. * EFBI (RW)
  262. *
  263. * Edge Filtering during Bus Integration
  264. * 0= Edge filtering disabled
  265. * 1= Two consecutive dominant tq required to detect an edge for hard synchronization
  266. */
  267. #define MCAN_CCCR_EFBI_MASK (0x2000U)
  268. #define MCAN_CCCR_EFBI_SHIFT (13U)
  269. #define MCAN_CCCR_EFBI_SET(x) (((uint32_t)(x) << MCAN_CCCR_EFBI_SHIFT) & MCAN_CCCR_EFBI_MASK)
  270. #define MCAN_CCCR_EFBI_GET(x) (((uint32_t)(x) & MCAN_CCCR_EFBI_MASK) >> MCAN_CCCR_EFBI_SHIFT)
  271. /*
  272. * PXHD (RW)
  273. *
  274. * Protocol Exception Handling Disable
  275. * 0= Protocol exception handling enabled
  276. * 1= Protocol exception handling disabled
  277. * Note: When protocol exception handling is disabled, the M_CAN will transmit an error frame when it detects a protocol exception condition.
  278. */
  279. #define MCAN_CCCR_PXHD_MASK (0x1000U)
  280. #define MCAN_CCCR_PXHD_SHIFT (12U)
  281. #define MCAN_CCCR_PXHD_SET(x) (((uint32_t)(x) << MCAN_CCCR_PXHD_SHIFT) & MCAN_CCCR_PXHD_MASK)
  282. #define MCAN_CCCR_PXHD_GET(x) (((uint32_t)(x) & MCAN_CCCR_PXHD_MASK) >> MCAN_CCCR_PXHD_SHIFT)
  283. /*
  284. * WMM (RW)
  285. *
  286. * Wide Message Marker
  287. * Enables the use of 16-bit Wide Message Markers. When 16-bit Wide Message Markers are used (WMM = ‘1’), 16-bit internal timestamping is disabled for the Tx Event FIFO.
  288. * 0= 8-bit Message Marker used
  289. * 1= 16-bit Message Marker used, replacing 16-bit timestamps in Tx Event FIFO
  290. */
  291. #define MCAN_CCCR_WMM_MASK (0x800U)
  292. #define MCAN_CCCR_WMM_SHIFT (11U)
  293. #define MCAN_CCCR_WMM_SET(x) (((uint32_t)(x) << MCAN_CCCR_WMM_SHIFT) & MCAN_CCCR_WMM_MASK)
  294. #define MCAN_CCCR_WMM_GET(x) (((uint32_t)(x) & MCAN_CCCR_WMM_MASK) >> MCAN_CCCR_WMM_SHIFT)
  295. /*
  296. * UTSU (RW)
  297. *
  298. * Use Timestamping Unit
  299. * When UTSU is set, 16-bit Wide Message Markers are also enabled regardless of the value of WMM.
  300. * 0= Internal time stamping
  301. * 1= External time stamping by TSU
  302. * Note: When generic parameter connected_tsu_g = ‘0’, there is no TSU connected to the M_CAN.
  303. * In this case bit UTSU is fixed to zero by synthesis.
  304. */
  305. #define MCAN_CCCR_UTSU_MASK (0x400U)
  306. #define MCAN_CCCR_UTSU_SHIFT (10U)
  307. #define MCAN_CCCR_UTSU_SET(x) (((uint32_t)(x) << MCAN_CCCR_UTSU_SHIFT) & MCAN_CCCR_UTSU_MASK)
  308. #define MCAN_CCCR_UTSU_GET(x) (((uint32_t)(x) & MCAN_CCCR_UTSU_MASK) >> MCAN_CCCR_UTSU_SHIFT)
  309. /*
  310. * BRSE (RW)
  311. *
  312. * Bit Rate Switch Enable
  313. * 0= Bit rate switching for transmissions disabled
  314. * 1= Bit rate switching for transmissions enabled
  315. * Note: When CAN FD operation is disabled FDOE = ‘0’, BRSE is not evaluated.
  316. */
  317. #define MCAN_CCCR_BRSE_MASK (0x200U)
  318. #define MCAN_CCCR_BRSE_SHIFT (9U)
  319. #define MCAN_CCCR_BRSE_SET(x) (((uint32_t)(x) << MCAN_CCCR_BRSE_SHIFT) & MCAN_CCCR_BRSE_MASK)
  320. #define MCAN_CCCR_BRSE_GET(x) (((uint32_t)(x) & MCAN_CCCR_BRSE_MASK) >> MCAN_CCCR_BRSE_SHIFT)
  321. /*
  322. * FDOE (RW)
  323. *
  324. * FD Operation Enable
  325. * 0= FD operation disabled
  326. * 1= FD operation enabled
  327. */
  328. #define MCAN_CCCR_FDOE_MASK (0x100U)
  329. #define MCAN_CCCR_FDOE_SHIFT (8U)
  330. #define MCAN_CCCR_FDOE_SET(x) (((uint32_t)(x) << MCAN_CCCR_FDOE_SHIFT) & MCAN_CCCR_FDOE_MASK)
  331. #define MCAN_CCCR_FDOE_GET(x) (((uint32_t)(x) & MCAN_CCCR_FDOE_MASK) >> MCAN_CCCR_FDOE_SHIFT)
  332. /*
  333. * TEST (RW)
  334. *
  335. * Test Mode Enable
  336. * 0= Normal operation, register TEST holds reset values
  337. * 1= Test Mode, write access to register TEST enabled
  338. */
  339. #define MCAN_CCCR_TEST_MASK (0x80U)
  340. #define MCAN_CCCR_TEST_SHIFT (7U)
  341. #define MCAN_CCCR_TEST_SET(x) (((uint32_t)(x) << MCAN_CCCR_TEST_SHIFT) & MCAN_CCCR_TEST_MASK)
  342. #define MCAN_CCCR_TEST_GET(x) (((uint32_t)(x) & MCAN_CCCR_TEST_MASK) >> MCAN_CCCR_TEST_SHIFT)
  343. /*
  344. * DAR (RW)
  345. *
  346. * Disable Automatic Retransmission
  347. * 0= Automatic retransmission of messages not transmitted successfully enabled
  348. * 1= Automatic retransmission disabled
  349. */
  350. #define MCAN_CCCR_DAR_MASK (0x40U)
  351. #define MCAN_CCCR_DAR_SHIFT (6U)
  352. #define MCAN_CCCR_DAR_SET(x) (((uint32_t)(x) << MCAN_CCCR_DAR_SHIFT) & MCAN_CCCR_DAR_MASK)
  353. #define MCAN_CCCR_DAR_GET(x) (((uint32_t)(x) & MCAN_CCCR_DAR_MASK) >> MCAN_CCCR_DAR_SHIFT)
  354. /*
  355. * MON (RW)
  356. *
  357. * Bus Monitoring Mode
  358. * Bit MON can only be set by the Host when both CCE and INIT are set to ‘1’. The bit can be reset by the Host at any time.
  359. * 0= Bus Monitoring Mode is disabled
  360. * 1= Bus Monitoring Mode is enabled
  361. */
  362. #define MCAN_CCCR_MON_MASK (0x20U)
  363. #define MCAN_CCCR_MON_SHIFT (5U)
  364. #define MCAN_CCCR_MON_SET(x) (((uint32_t)(x) << MCAN_CCCR_MON_SHIFT) & MCAN_CCCR_MON_MASK)
  365. #define MCAN_CCCR_MON_GET(x) (((uint32_t)(x) & MCAN_CCCR_MON_MASK) >> MCAN_CCCR_MON_SHIFT)
  366. /*
  367. * CSR (RW)
  368. *
  369. * Clock Stop Request
  370. * 0= No clock stop is requested
  371. * 1= Clock stop requested. When clock stop is requested, first INIT and then CSA will be set after all pending transfer requests have been completed and the CAN bus reached idle.
  372. */
  373. #define MCAN_CCCR_CSR_MASK (0x10U)
  374. #define MCAN_CCCR_CSR_SHIFT (4U)
  375. #define MCAN_CCCR_CSR_SET(x) (((uint32_t)(x) << MCAN_CCCR_CSR_SHIFT) & MCAN_CCCR_CSR_MASK)
  376. #define MCAN_CCCR_CSR_GET(x) (((uint32_t)(x) & MCAN_CCCR_CSR_MASK) >> MCAN_CCCR_CSR_SHIFT)
  377. /*
  378. * CSA (R)
  379. *
  380. * Clock Stop Acknowledge
  381. * 0= No clock stop acknowledged
  382. * 1= M_CAN may be set in power down by stopping m_can_hclk and m_can_cclk
  383. */
  384. #define MCAN_CCCR_CSA_MASK (0x8U)
  385. #define MCAN_CCCR_CSA_SHIFT (3U)
  386. #define MCAN_CCCR_CSA_GET(x) (((uint32_t)(x) & MCAN_CCCR_CSA_MASK) >> MCAN_CCCR_CSA_SHIFT)
  387. /*
  388. * ASM (RW)
  389. *
  390. * Restricted Operation Mode
  391. * Bit ASM can only be set by the Host when both CCE and INIT are set to ‘1’. The bit can be reset by the Host at any time. For a description of the Restricted Operation Mode see Section 3.1.5.
  392. * 0= Normal CAN operation
  393. * 1= Restricted Operation Mode active
  394. */
  395. #define MCAN_CCCR_ASM_MASK (0x4U)
  396. #define MCAN_CCCR_ASM_SHIFT (2U)
  397. #define MCAN_CCCR_ASM_SET(x) (((uint32_t)(x) << MCAN_CCCR_ASM_SHIFT) & MCAN_CCCR_ASM_MASK)
  398. #define MCAN_CCCR_ASM_GET(x) (((uint32_t)(x) & MCAN_CCCR_ASM_MASK) >> MCAN_CCCR_ASM_SHIFT)
  399. /*
  400. * CCE (RW)
  401. *
  402. * Configuration Change Enable
  403. * 0= The CPU has no write access to the protected configuration registers
  404. * 1= The CPU has write access to the protected configuration registers (while CCCR.INIT = ‘1’)
  405. */
  406. #define MCAN_CCCR_CCE_MASK (0x2U)
  407. #define MCAN_CCCR_CCE_SHIFT (1U)
  408. #define MCAN_CCCR_CCE_SET(x) (((uint32_t)(x) << MCAN_CCCR_CCE_SHIFT) & MCAN_CCCR_CCE_MASK)
  409. #define MCAN_CCCR_CCE_GET(x) (((uint32_t)(x) & MCAN_CCCR_CCE_MASK) >> MCAN_CCCR_CCE_SHIFT)
  410. /*
  411. * INIT (RW)
  412. *
  413. * Initialization
  414. * 0= Normal Operation
  415. * 1= Initialization is started
  416. */
  417. #define MCAN_CCCR_INIT_MASK (0x1U)
  418. #define MCAN_CCCR_INIT_SHIFT (0U)
  419. #define MCAN_CCCR_INIT_SET(x) (((uint32_t)(x) << MCAN_CCCR_INIT_SHIFT) & MCAN_CCCR_INIT_MASK)
  420. #define MCAN_CCCR_INIT_GET(x) (((uint32_t)(x) & MCAN_CCCR_INIT_MASK) >> MCAN_CCCR_INIT_SHIFT)
  421. /* Bitfield definition for register: NBTP */
  422. /*
  423. * NSJW (RW)
  424. *
  425. * Nominal (Re)Synchronization Jump Width
  426. * Valid values are 0 to 127. The actual interpretation by the hardware of this value is such that one more than the value programmed here is used.
  427. */
  428. #define MCAN_NBTP_NSJW_MASK (0xFE000000UL)
  429. #define MCAN_NBTP_NSJW_SHIFT (25U)
  430. #define MCAN_NBTP_NSJW_SET(x) (((uint32_t)(x) << MCAN_NBTP_NSJW_SHIFT) & MCAN_NBTP_NSJW_MASK)
  431. #define MCAN_NBTP_NSJW_GET(x) (((uint32_t)(x) & MCAN_NBTP_NSJW_MASK) >> MCAN_NBTP_NSJW_SHIFT)
  432. /*
  433. * NBRP (RW)
  434. *
  435. * Nominal Bit Rate Prescaler
  436. * The value by which the oscillator frequency is divided for generating the bit time quanta. The bit time is built up from a multiple of this quanta. Valid values for the Bit Rate Prescaler are 0 to 511. The actual interpretation by the hardware of this value is
  437. * such that one more than the value programmed here is used.
  438. */
  439. #define MCAN_NBTP_NBRP_MASK (0x1FF0000UL)
  440. #define MCAN_NBTP_NBRP_SHIFT (16U)
  441. #define MCAN_NBTP_NBRP_SET(x) (((uint32_t)(x) << MCAN_NBTP_NBRP_SHIFT) & MCAN_NBTP_NBRP_MASK)
  442. #define MCAN_NBTP_NBRP_GET(x) (((uint32_t)(x) & MCAN_NBTP_NBRP_MASK) >> MCAN_NBTP_NBRP_SHIFT)
  443. /*
  444. * NTSEG1 (RW)
  445. *
  446. * Nominal Time segment before sample point
  447. * Valid values are 1 to 255. The actual interpretation by the hardware of this value is such that one more than the programmed value is used.
  448. */
  449. #define MCAN_NBTP_NTSEG1_MASK (0xFF00U)
  450. #define MCAN_NBTP_NTSEG1_SHIFT (8U)
  451. #define MCAN_NBTP_NTSEG1_SET(x) (((uint32_t)(x) << MCAN_NBTP_NTSEG1_SHIFT) & MCAN_NBTP_NTSEG1_MASK)
  452. #define MCAN_NBTP_NTSEG1_GET(x) (((uint32_t)(x) & MCAN_NBTP_NTSEG1_MASK) >> MCAN_NBTP_NTSEG1_SHIFT)
  453. /*
  454. * NTSEG2 (RW)
  455. *
  456. * Nominal Time segment after sample point
  457. * Valid values are 1 to 127. The actual interpretation by the hardware of this value is such that one more than the programmed value is used.
  458. */
  459. #define MCAN_NBTP_NTSEG2_MASK (0x7FU)
  460. #define MCAN_NBTP_NTSEG2_SHIFT (0U)
  461. #define MCAN_NBTP_NTSEG2_SET(x) (((uint32_t)(x) << MCAN_NBTP_NTSEG2_SHIFT) & MCAN_NBTP_NTSEG2_MASK)
  462. #define MCAN_NBTP_NTSEG2_GET(x) (((uint32_t)(x) & MCAN_NBTP_NTSEG2_MASK) >> MCAN_NBTP_NTSEG2_SHIFT)
  463. /* Bitfield definition for register: TSCC */
  464. /*
  465. * TCP (RW)
  466. *
  467. * Timestamp Counter Prescaler
  468. * Configures the timestamp and timeout counters time unit in multiples of CAN bit times [1…16]. The actual interpretation by the hardware of this value is such that one more than the value programmed here is used.
  469. */
  470. #define MCAN_TSCC_TCP_MASK (0xF0000UL)
  471. #define MCAN_TSCC_TCP_SHIFT (16U)
  472. #define MCAN_TSCC_TCP_SET(x) (((uint32_t)(x) << MCAN_TSCC_TCP_SHIFT) & MCAN_TSCC_TCP_MASK)
  473. #define MCAN_TSCC_TCP_GET(x) (((uint32_t)(x) & MCAN_TSCC_TCP_MASK) >> MCAN_TSCC_TCP_SHIFT)
  474. /*
  475. * TSS (RW)
  476. *
  477. * timestamp Select
  478. * 00= Timestamp counter value always 0x0000
  479. * 01= Timestamp counter value incremented according to TCP
  480. * 10= External timestamp counter value used
  481. * 11= Same as “00”
  482. */
  483. #define MCAN_TSCC_TSS_MASK (0x3U)
  484. #define MCAN_TSCC_TSS_SHIFT (0U)
  485. #define MCAN_TSCC_TSS_SET(x) (((uint32_t)(x) << MCAN_TSCC_TSS_SHIFT) & MCAN_TSCC_TSS_MASK)
  486. #define MCAN_TSCC_TSS_GET(x) (((uint32_t)(x) & MCAN_TSCC_TSS_MASK) >> MCAN_TSCC_TSS_SHIFT)
  487. /* Bitfield definition for register: TSCV */
  488. /*
  489. * TSC (RC)
  490. *
  491. * Timestamp Counter
  492. * The internal/external Timestamp Counter value is captured on start of frame (both Rx and Tx).When TSCC.TSS = “01”, the Timestamp Counter is incremented in multiples of CAN bit times [1…16] depending on the configuration of TSCC.TCP. A wrap around sets interrupt flag IR.TSW. Write access resets the counter to zero. When TSCC.TSS = “10”, TSC reflects the external Timestamp Counter value. A write access has no impact.
  493. */
  494. #define MCAN_TSCV_TSC_MASK (0xFFFFU)
  495. #define MCAN_TSCV_TSC_SHIFT (0U)
  496. #define MCAN_TSCV_TSC_GET(x) (((uint32_t)(x) & MCAN_TSCV_TSC_MASK) >> MCAN_TSCV_TSC_SHIFT)
  497. /* Bitfield definition for register: TOCC */
  498. /*
  499. * TOP (RW)
  500. *
  501. * Timeout Period
  502. * Start value of the Timeout Counter (down-counter). Configures the Timeout Period.
  503. */
  504. #define MCAN_TOCC_TOP_MASK (0xFFFF0000UL)
  505. #define MCAN_TOCC_TOP_SHIFT (16U)
  506. #define MCAN_TOCC_TOP_SET(x) (((uint32_t)(x) << MCAN_TOCC_TOP_SHIFT) & MCAN_TOCC_TOP_MASK)
  507. #define MCAN_TOCC_TOP_GET(x) (((uint32_t)(x) & MCAN_TOCC_TOP_MASK) >> MCAN_TOCC_TOP_SHIFT)
  508. /*
  509. * TOS (RW)
  510. *
  511. * Timeout Select
  512. * When operating in Continuous mode, a write to TOCV presets the counter to the value configured by TOCC.TOP and continues down-counting. When the Timeout Counter is controlled by one of the FIFOs, an empty FIFO presets the counter to the value configured by TOCC.TOP. Down-counting is started when the first FIFO element is stored.
  513. * 00= Continuous operation
  514. * 01= Timeout controlled by Tx Event FIFO
  515. * 10= Timeout controlled by Rx FIFO 0
  516. * 11= Timeout controlled by Rx FIFO 1
  517. */
  518. #define MCAN_TOCC_TOS_MASK (0x6U)
  519. #define MCAN_TOCC_TOS_SHIFT (1U)
  520. #define MCAN_TOCC_TOS_SET(x) (((uint32_t)(x) << MCAN_TOCC_TOS_SHIFT) & MCAN_TOCC_TOS_MASK)
  521. #define MCAN_TOCC_TOS_GET(x) (((uint32_t)(x) & MCAN_TOCC_TOS_MASK) >> MCAN_TOCC_TOS_SHIFT)
  522. /*
  523. * RP (RW)
  524. *
  525. * Enable Timeout Counter
  526. * 0= Timeout Counter disabled
  527. * 1= Timeout Counter enabled
  528. */
  529. #define MCAN_TOCC_RP_MASK (0x1U)
  530. #define MCAN_TOCC_RP_SHIFT (0U)
  531. #define MCAN_TOCC_RP_SET(x) (((uint32_t)(x) << MCAN_TOCC_RP_SHIFT) & MCAN_TOCC_RP_MASK)
  532. #define MCAN_TOCC_RP_GET(x) (((uint32_t)(x) & MCAN_TOCC_RP_MASK) >> MCAN_TOCC_RP_SHIFT)
  533. /* Bitfield definition for register: TOCV */
  534. /*
  535. * TOC (RC)
  536. *
  537. * Timeout Counter
  538. * The Timeout Counter is decremented in multiples of CAN bit times [1…16] depending on the configuration of TSCC.TCP. When decremented to zero, interrupt flag IR.TOO is set and the Timeout Counter is stopped. Start and reset/restart conditions are configured via TOCC.TOS.
  539. * Note: Byte access: when TOCC.TOS = “00,writing one of the register bytes 3/2/1/0 will preset the Timeout Counter.
  540. */
  541. #define MCAN_TOCV_TOC_MASK (0xFFFFU)
  542. #define MCAN_TOCV_TOC_SHIFT (0U)
  543. #define MCAN_TOCV_TOC_GET(x) (((uint32_t)(x) & MCAN_TOCV_TOC_MASK) >> MCAN_TOCV_TOC_SHIFT)
  544. /* Bitfield definition for register: ECR */
  545. /*
  546. * CEL (X)
  547. *
  548. * CAN Error Logging
  549. * The counter is incremented each time when a CAN protocol error causes the 8-bit Transmit Error Counter TEC or the 7-bit Receive Error Counter REC to be incremented. The counter is also incremented when the Bus_Off limit is reached. It is not incremented when only RP is set without changing REC. The increment of CEL follows after the increment of REC or TEC.
  550. * The counter is reset by read access to CEL. The counter stops at 0xFF; the next increment of TEC or REC sets interrupt flag IR.ELO.
  551. * Note: Byte access: Reading byte 2 will reset CEL to zero, reading bytes 3/1/0 has no impact.
  552. */
  553. #define MCAN_ECR_CEL_MASK (0xFF0000UL)
  554. #define MCAN_ECR_CEL_SHIFT (16U)
  555. #define MCAN_ECR_CEL_GET(x) (((uint32_t)(x) & MCAN_ECR_CEL_MASK) >> MCAN_ECR_CEL_SHIFT)
  556. /*
  557. * RP (R)
  558. *
  559. * Receive Error Passive
  560. * 0= The Receive Error Counter is below the error passive level of 128
  561. * 1= The Receive Error Counter has reached the error passive level of 128
  562. */
  563. #define MCAN_ECR_RP_MASK (0x8000U)
  564. #define MCAN_ECR_RP_SHIFT (15U)
  565. #define MCAN_ECR_RP_GET(x) (((uint32_t)(x) & MCAN_ECR_RP_MASK) >> MCAN_ECR_RP_SHIFT)
  566. /*
  567. * REC (R)
  568. *
  569. * Receive Error Counter
  570. * Actual state of the Receive Error Counter, values between 0 and 127
  571. */
  572. #define MCAN_ECR_REC_MASK (0x7F00U)
  573. #define MCAN_ECR_REC_SHIFT (8U)
  574. #define MCAN_ECR_REC_GET(x) (((uint32_t)(x) & MCAN_ECR_REC_MASK) >> MCAN_ECR_REC_SHIFT)
  575. /*
  576. * TEC (R)
  577. *
  578. * Transmit Error Counter
  579. * Actual state of the Transmit Error Counter, values between 0 and 255
  580. * Note: When CCCR.ASM is set, the CAN protocol controller does not increment TEC and REC when a CAN protocol error is detected, but CEL is still incremented.
  581. */
  582. #define MCAN_ECR_TEC_MASK (0xFFU)
  583. #define MCAN_ECR_TEC_SHIFT (0U)
  584. #define MCAN_ECR_TEC_GET(x) (((uint32_t)(x) & MCAN_ECR_TEC_MASK) >> MCAN_ECR_TEC_SHIFT)
  585. /* Bitfield definition for register: PSR */
  586. /*
  587. * TDCV (R)
  588. *
  589. * Transmitter Delay Compensation Value
  590. * Position of the secondary sample point, defined by the sum of the measured delay from m_can_tx to m_can_rx and TDCR.TDCO. The SSP position is, in the data phase, the number of mtq between the start of the transmitted bit and the secondary sample point. Valid values are 0 to 127 mtq.
  591. */
  592. #define MCAN_PSR_TDCV_MASK (0x7F0000UL)
  593. #define MCAN_PSR_TDCV_SHIFT (16U)
  594. #define MCAN_PSR_TDCV_GET(x) (((uint32_t)(x) & MCAN_PSR_TDCV_MASK) >> MCAN_PSR_TDCV_SHIFT)
  595. /*
  596. * PXE (X)
  597. *
  598. * Protocol Exception Event
  599. * 0= No protocol exception event occurred since last read access
  600. * 1= Protocol exception event occurred
  601. * Note: Byte access: Reading byte 0 will reset PXE, reading bytes 3/2/1 has no impact.
  602. */
  603. #define MCAN_PSR_PXE_MASK (0x4000U)
  604. #define MCAN_PSR_PXE_SHIFT (14U)
  605. #define MCAN_PSR_PXE_GET(x) (((uint32_t)(x) & MCAN_PSR_PXE_MASK) >> MCAN_PSR_PXE_SHIFT)
  606. /*
  607. * RFDF (X)
  608. *
  609. * Received a CAN FD Message
  610. * This bit is set independent of acceptance filtering.
  611. * 0= Since this bit was reset by the CPU, no CAN FD message has been received
  612. * 1= Message in CAN FD format with FDF flag set has been received
  613. * Note: Byte access: Reading byte 0 will reset RFDF, reading bytes 3/2/1 has no impact.
  614. */
  615. #define MCAN_PSR_RFDF_MASK (0x2000U)
  616. #define MCAN_PSR_RFDF_SHIFT (13U)
  617. #define MCAN_PSR_RFDF_GET(x) (((uint32_t)(x) & MCAN_PSR_RFDF_MASK) >> MCAN_PSR_RFDF_SHIFT)
  618. /*
  619. * RBRS (X)
  620. *
  621. * BRS flag of last received CAN FD Message
  622. * This bit is set together with RFDF, independent of acceptance filtering.
  623. * 0= Last received CAN FD message did not have its BRS flag set
  624. * 1= Last received CAN FD message had its BRS flag set
  625. * Note: Byte access: Reading byte 0 will reset RBRS, reading bytes 3/2/1 has no impact.
  626. */
  627. #define MCAN_PSR_RBRS_MASK (0x1000U)
  628. #define MCAN_PSR_RBRS_SHIFT (12U)
  629. #define MCAN_PSR_RBRS_GET(x) (((uint32_t)(x) & MCAN_PSR_RBRS_MASK) >> MCAN_PSR_RBRS_SHIFT)
  630. /*
  631. * RESI (X)
  632. *
  633. * ESI flag of last received CAN FD Message
  634. * This bit is set together with RFDF, independent of acceptance filtering.
  635. * 0= Last received CAN FD message did not have its ESI flag set
  636. * 1= Last received CAN FD message had its ESI flag set
  637. * Note: Byte access: Reading byte 0 will reset RESI, reading bytes 3/2/1 has no impact.
  638. */
  639. #define MCAN_PSR_RESI_MASK (0x800U)
  640. #define MCAN_PSR_RESI_SHIFT (11U)
  641. #define MCAN_PSR_RESI_GET(x) (((uint32_t)(x) & MCAN_PSR_RESI_MASK) >> MCAN_PSR_RESI_SHIFT)
  642. /*
  643. * DLEC (S)
  644. *
  645. * Data Phase Last Error Code
  646. * Type of last error that occurred in the data phase of a CAN FD format frame with its BRS flag set.Coding is the same as for LEC. This field will be cleared to zero when a CAN FD format frame with
  647. * its BRS flag set has been transferred (reception or transmission) without error.
  648. * Note: Byte access: Reading byte 0 will set DLEC to “111”, reading bytes 3/2/1 has no impact.
  649. */
  650. #define MCAN_PSR_DLEC_MASK (0x700U)
  651. #define MCAN_PSR_DLEC_SHIFT (8U)
  652. #define MCAN_PSR_DLEC_GET(x) (((uint32_t)(x) & MCAN_PSR_DLEC_MASK) >> MCAN_PSR_DLEC_SHIFT)
  653. /*
  654. * BO (R)
  655. *
  656. * Bus_Off Status
  657. * 0= The M_CAN is not Bus_Off
  658. * 1= The M_CAN is in Bus_Off state
  659. */
  660. #define MCAN_PSR_BO_MASK (0x80U)
  661. #define MCAN_PSR_BO_SHIFT (7U)
  662. #define MCAN_PSR_BO_GET(x) (((uint32_t)(x) & MCAN_PSR_BO_MASK) >> MCAN_PSR_BO_SHIFT)
  663. /*
  664. * EW (R)
  665. *
  666. * Warning Status
  667. * 0= Both error counters are below the Error_Warning limit of 96
  668. * 1= At least one of error counter has reached the Error_Warning limit of 96
  669. */
  670. #define MCAN_PSR_EW_MASK (0x40U)
  671. #define MCAN_PSR_EW_SHIFT (6U)
  672. #define MCAN_PSR_EW_GET(x) (((uint32_t)(x) & MCAN_PSR_EW_MASK) >> MCAN_PSR_EW_SHIFT)
  673. /*
  674. * EP (R)
  675. *
  676. * Error Passive
  677. * 0= The M_CAN is in the Error_Active state. It normally takes part in bus communication and sends an active error flag when an error has been detected
  678. * 1= The M_CAN is in the Error_Passive state
  679. */
  680. #define MCAN_PSR_EP_MASK (0x20U)
  681. #define MCAN_PSR_EP_SHIFT (5U)
  682. #define MCAN_PSR_EP_GET(x) (((uint32_t)(x) & MCAN_PSR_EP_MASK) >> MCAN_PSR_EP_SHIFT)
  683. /*
  684. * ACT (R)
  685. *
  686. * Activity
  687. * Monitors the module’s CAN communication state.
  688. * 00= Synchronizing - node is synchronizing on CAN communication
  689. * 01= Idle - node is neither receiver nor transmitter
  690. * 10= Receiver - node is operating as receiver
  691. * 11= Transmitter - node is operating as transmitter
  692. * Note: ACT is set to “00” by a Protocol Exception Event.
  693. */
  694. #define MCAN_PSR_ACT_MASK (0x18U)
  695. #define MCAN_PSR_ACT_SHIFT (3U)
  696. #define MCAN_PSR_ACT_GET(x) (((uint32_t)(x) & MCAN_PSR_ACT_MASK) >> MCAN_PSR_ACT_SHIFT)
  697. /*
  698. * LEC (S)
  699. *
  700. * Last Error Code
  701. * The LEC indicates the type of the last error to occur on the CAN bus. This field will be cleared to ‘0’when a message has been transferred (reception or transmission) without error.
  702. * 0= No Error: No error occurred since LEC has been reset by successful reception or transmission.
  703. * 1= Stuff Error: More than 5 equal bits in a sequence have occurred in a part of a received message where this is not allowed.
  704. * 2= Form Error: A fixed format part of a received frame has the wrong format.
  705. * 3= AckError: The message transmitted by the M_CAN was not acknowledged by another node.
  706. * 4= Bit1Error: During the transmission of a message (with the exception of the arbitration field),
  707. * the device wanted to send a recessive level (bit of logical value ‘1’), but the monitored bus
  708. * value was dominant.
  709. * 5= Bit0Error: During the transmission of a message (or acknowledge bit, or active error flag, or overload flag), the device wanted to send a dominant level (data or identifier bit logical value‘0’), but the monitored bus value was recessive. During Bus_Off recovery this status is set each time a sequence of 11 recessive bits has been monitored. This enables the CPU to monitor the proceeding of the Bus_Off recovery sequence (indicating the bus is not stuck at
  710. * dominant or continuously disturbed).
  711. * 6= CRCError: The CRC check sum of a received message was incorrect. The CRC of an incoming message does not match with the CRC calculated from the received data.
  712. * 7= NoChange: Any read access to the Protocol Status Register re-initializes the LEC to ‘7’. When the LEC shows the value ‘7’, no CAN bus event was detected since the last CPU read access to the Protocol Status Register.
  713. * Note: When a frame in CAN FD format has reached the data phase with BRS flag set, the next CAN event (error or valid frame) will be shown in DLEC instead of LEC. An error in a fixed stuff bit of a CAN FD CRC sequence will be shown as a Form Error, not Stuff Error.
  714. * Note: The Bus_Off recovery sequence (see ISO 11898-1:2015) cannot be shortened by setting or resetting CCCR.INIT. If the device goes Bus_Off, it will set CCCR.INIT of its own accord,stopping all bus activities. Once CCCR.INIT has been cleared by the CPU, the device will then wait for 129 occurrences of Bus Idle (129 * 11 consecutive recessive bits) before resuming normal operation. At the end of the Bus_Off recovery sequence, the Error Management Counters will be reset. During the waiting time after the resetting of CCCR.INIT, each time a sequence of 11 recessive bits has been monitored, a Bit0Error code is written to PSR.LEC, enabling the CPU to readily check up whether the CAN bus is stuck at dominant or continuously disturbed and to monitor the Bus_Off recovery sequence. ECR.REC is used to count these sequences.
  715. * Note: Byte access: Reading byte 0 will set LEC to “111”, reading bytes 3/2/1 has no impact.
  716. */
  717. #define MCAN_PSR_LEC_MASK (0x7U)
  718. #define MCAN_PSR_LEC_SHIFT (0U)
  719. #define MCAN_PSR_LEC_GET(x) (((uint32_t)(x) & MCAN_PSR_LEC_MASK) >> MCAN_PSR_LEC_SHIFT)
  720. /* Bitfield definition for register: TDCR */
  721. /*
  722. * TDCO (RW)
  723. *
  724. * Transmitter Delay Compensation SSP Offset
  725. * Offset value defining the distance between the measured delay from m_can_tx to m_can_rx and the secondary sample point. Valid values are 0 to 127 mtq.
  726. */
  727. #define MCAN_TDCR_TDCO_MASK (0x7F00U)
  728. #define MCAN_TDCR_TDCO_SHIFT (8U)
  729. #define MCAN_TDCR_TDCO_SET(x) (((uint32_t)(x) << MCAN_TDCR_TDCO_SHIFT) & MCAN_TDCR_TDCO_MASK)
  730. #define MCAN_TDCR_TDCO_GET(x) (((uint32_t)(x) & MCAN_TDCR_TDCO_MASK) >> MCAN_TDCR_TDCO_SHIFT)
  731. /*
  732. * TDCF (RW)
  733. *
  734. * Transmitter Delay Compensation Filter Window Length
  735. * Defines the minimum value for the SSP position, dominant edges on m_can_rx that would result in an earlier SSP position are ignored for transmitter delay measurement. The feature is enabled when TDCF is configured to a value greater than TDCO. Valid values are 0 to 127 mtq.
  736. */
  737. #define MCAN_TDCR_TDCF_MASK (0x7FU)
  738. #define MCAN_TDCR_TDCF_SHIFT (0U)
  739. #define MCAN_TDCR_TDCF_SET(x) (((uint32_t)(x) << MCAN_TDCR_TDCF_SHIFT) & MCAN_TDCR_TDCF_MASK)
  740. #define MCAN_TDCR_TDCF_GET(x) (((uint32_t)(x) & MCAN_TDCR_TDCF_MASK) >> MCAN_TDCR_TDCF_SHIFT)
  741. /* Bitfield definition for register: IR */
  742. /*
  743. * ARA (RW)
  744. *
  745. * Access to Reserved Address
  746. * 0= No access to reserved address occurred
  747. * 1= Access to reserved address occurred
  748. */
  749. #define MCAN_IR_ARA_MASK (0x20000000UL)
  750. #define MCAN_IR_ARA_SHIFT (29U)
  751. #define MCAN_IR_ARA_SET(x) (((uint32_t)(x) << MCAN_IR_ARA_SHIFT) & MCAN_IR_ARA_MASK)
  752. #define MCAN_IR_ARA_GET(x) (((uint32_t)(x) & MCAN_IR_ARA_MASK) >> MCAN_IR_ARA_SHIFT)
  753. /*
  754. * PED (RW)
  755. *
  756. * Protocol Error in Data Phase (Data Bit Time is used)
  757. * 0= No protocol error in data phase
  758. * 1= Protocol error in data phase detected (PSR.DLEC ≠ 0,7)
  759. */
  760. #define MCAN_IR_PED_MASK (0x10000000UL)
  761. #define MCAN_IR_PED_SHIFT (28U)
  762. #define MCAN_IR_PED_SET(x) (((uint32_t)(x) << MCAN_IR_PED_SHIFT) & MCAN_IR_PED_MASK)
  763. #define MCAN_IR_PED_GET(x) (((uint32_t)(x) & MCAN_IR_PED_MASK) >> MCAN_IR_PED_SHIFT)
  764. /*
  765. * PEA (RW)
  766. *
  767. * Protocol Error in Arbitration Phase (Nominal Bit Time is used)
  768. * 0= No protocol error in arbitration phase
  769. * 1= Protocol error in arbitration phase detected (PSR.LEC ≠ 0,7)
  770. */
  771. #define MCAN_IR_PEA_MASK (0x8000000UL)
  772. #define MCAN_IR_PEA_SHIFT (27U)
  773. #define MCAN_IR_PEA_SET(x) (((uint32_t)(x) << MCAN_IR_PEA_SHIFT) & MCAN_IR_PEA_MASK)
  774. #define MCAN_IR_PEA_GET(x) (((uint32_t)(x) & MCAN_IR_PEA_MASK) >> MCAN_IR_PEA_SHIFT)
  775. /*
  776. * WDI (RW)
  777. *
  778. * Watchdog Interrupt
  779. * 0= No Message RAM Watchdog event occurred
  780. * 1= Message RAM Watchdog event due to missing READY
  781. */
  782. #define MCAN_IR_WDI_MASK (0x4000000UL)
  783. #define MCAN_IR_WDI_SHIFT (26U)
  784. #define MCAN_IR_WDI_SET(x) (((uint32_t)(x) << MCAN_IR_WDI_SHIFT) & MCAN_IR_WDI_MASK)
  785. #define MCAN_IR_WDI_GET(x) (((uint32_t)(x) & MCAN_IR_WDI_MASK) >> MCAN_IR_WDI_SHIFT)
  786. /*
  787. * BO (RW)
  788. *
  789. * Bus_Off Status
  790. * 0= Bus_Off status unchanged
  791. * 1= Bus_Off status changed
  792. */
  793. #define MCAN_IR_BO_MASK (0x2000000UL)
  794. #define MCAN_IR_BO_SHIFT (25U)
  795. #define MCAN_IR_BO_SET(x) (((uint32_t)(x) << MCAN_IR_BO_SHIFT) & MCAN_IR_BO_MASK)
  796. #define MCAN_IR_BO_GET(x) (((uint32_t)(x) & MCAN_IR_BO_MASK) >> MCAN_IR_BO_SHIFT)
  797. /*
  798. * EW (RW)
  799. *
  800. * Warning Status
  801. * 0= Error_Warning status unchanged
  802. * 1= Error_Warning status changed
  803. */
  804. #define MCAN_IR_EW_MASK (0x1000000UL)
  805. #define MCAN_IR_EW_SHIFT (24U)
  806. #define MCAN_IR_EW_SET(x) (((uint32_t)(x) << MCAN_IR_EW_SHIFT) & MCAN_IR_EW_MASK)
  807. #define MCAN_IR_EW_GET(x) (((uint32_t)(x) & MCAN_IR_EW_MASK) >> MCAN_IR_EW_SHIFT)
  808. /*
  809. * EP (RW)
  810. *
  811. * Error Passive
  812. * 0= Error_Passive status unchanged
  813. * 1= Error_Passive status changed
  814. */
  815. #define MCAN_IR_EP_MASK (0x800000UL)
  816. #define MCAN_IR_EP_SHIFT (23U)
  817. #define MCAN_IR_EP_SET(x) (((uint32_t)(x) << MCAN_IR_EP_SHIFT) & MCAN_IR_EP_MASK)
  818. #define MCAN_IR_EP_GET(x) (((uint32_t)(x) & MCAN_IR_EP_MASK) >> MCAN_IR_EP_SHIFT)
  819. /*
  820. * ELO (RW)
  821. *
  822. * Error Logging Overflow
  823. * 0= CAN Error Logging Counter did not overflow
  824. * 1= Overflow of CAN Error Logging Counter occurred
  825. */
  826. #define MCAN_IR_ELO_MASK (0x400000UL)
  827. #define MCAN_IR_ELO_SHIFT (22U)
  828. #define MCAN_IR_ELO_SET(x) (((uint32_t)(x) << MCAN_IR_ELO_SHIFT) & MCAN_IR_ELO_MASK)
  829. #define MCAN_IR_ELO_GET(x) (((uint32_t)(x) & MCAN_IR_ELO_MASK) >> MCAN_IR_ELO_SHIFT)
  830. /*
  831. * BEU (RW)
  832. *
  833. * Bit Error Uncorrected
  834. * Message RAM bit error detected, uncorrected. Controlled by input signal m_can_aeim_berr[1] generated by an optional external parity / ECC logic attached to the Message RAM. An uncorrected Message RAM bit error sets CCCR.INIT to ‘1’. This is done to avoid transmission of corrupted data.
  835. * 0= No bit error detected when reading from Message RAM
  836. * 1= Bit error detected, uncorrected (e.g. parity logic)
  837. */
  838. #define MCAN_IR_BEU_MASK (0x200000UL)
  839. #define MCAN_IR_BEU_SHIFT (21U)
  840. #define MCAN_IR_BEU_SET(x) (((uint32_t)(x) << MCAN_IR_BEU_SHIFT) & MCAN_IR_BEU_MASK)
  841. #define MCAN_IR_BEU_GET(x) (((uint32_t)(x) & MCAN_IR_BEU_MASK) >> MCAN_IR_BEU_SHIFT)
  842. /*
  843. * BEC (RW)
  844. *
  845. * Bit Error Corrected
  846. * Message RAM bit error detected and corrected. Controlled by input signal m_can_aeim_berr[0] generated by an optional external parity / ECC logic attached to the Message RAM.
  847. * 0= No bit error detected when reading from Message RAM
  848. * 1= Bit error detected and corrected (e.g. ECC)
  849. */
  850. #define MCAN_IR_BEC_MASK (0x100000UL)
  851. #define MCAN_IR_BEC_SHIFT (20U)
  852. #define MCAN_IR_BEC_SET(x) (((uint32_t)(x) << MCAN_IR_BEC_SHIFT) & MCAN_IR_BEC_MASK)
  853. #define MCAN_IR_BEC_GET(x) (((uint32_t)(x) & MCAN_IR_BEC_MASK) >> MCAN_IR_BEC_SHIFT)
  854. /*
  855. * DRX (RW)
  856. *
  857. * Message stored to Dedicated Rx Buffer
  858. * The flag is set whenever a received message has been stored into a dedicated Rx Buffer.
  859. * 0= No Rx Buffer updated
  860. * 1= At least one received message stored into an Rx Buffer
  861. */
  862. #define MCAN_IR_DRX_MASK (0x80000UL)
  863. #define MCAN_IR_DRX_SHIFT (19U)
  864. #define MCAN_IR_DRX_SET(x) (((uint32_t)(x) << MCAN_IR_DRX_SHIFT) & MCAN_IR_DRX_MASK)
  865. #define MCAN_IR_DRX_GET(x) (((uint32_t)(x) & MCAN_IR_DRX_MASK) >> MCAN_IR_DRX_SHIFT)
  866. /*
  867. * TOO (RW)
  868. *
  869. * Timeout Occurred
  870. * 0= No timeout
  871. * 1= Timeout reached
  872. */
  873. #define MCAN_IR_TOO_MASK (0x40000UL)
  874. #define MCAN_IR_TOO_SHIFT (18U)
  875. #define MCAN_IR_TOO_SET(x) (((uint32_t)(x) << MCAN_IR_TOO_SHIFT) & MCAN_IR_TOO_MASK)
  876. #define MCAN_IR_TOO_GET(x) (((uint32_t)(x) & MCAN_IR_TOO_MASK) >> MCAN_IR_TOO_SHIFT)
  877. /*
  878. * MRAF (RW)
  879. *
  880. * Message RAM Access Failure
  881. * The flag is set, when the Rx Handler
  882. * .has not completed acceptance filtering or storage of an accepted message until the arbitration field of the following message has been received. In this case acceptance filtering or message
  883. * storage is aborted and the Rx Handler starts processing of the following message.
  884. * .was not able to write a message to the Message RAM. In this case message storage is aborted.
  885. * In both cases the FIFO put index is not updated resp. the New Data flag for a dedicated Rx Buffer is not set, a partly stored message is overwritten when the next message is stored to this location.
  886. * The flag is also set when the Tx Handler was not able to read a message from the Message RAM in time. In this case message transmission is aborted. In case of a Tx Handler access failure the
  887. * M_CAN is switched into Restricted Operation Mode (see Section 3.1.5). To leave Restricted Operation Mode, the Host CPU has to reset CCCR.ASM.
  888. * 0= No Message RAM access failure occurred
  889. * 1= Message RAM access failure occurred
  890. */
  891. #define MCAN_IR_MRAF_MASK (0x20000UL)
  892. #define MCAN_IR_MRAF_SHIFT (17U)
  893. #define MCAN_IR_MRAF_SET(x) (((uint32_t)(x) << MCAN_IR_MRAF_SHIFT) & MCAN_IR_MRAF_MASK)
  894. #define MCAN_IR_MRAF_GET(x) (((uint32_t)(x) & MCAN_IR_MRAF_MASK) >> MCAN_IR_MRAF_SHIFT)
  895. /*
  896. * TSW (RW)
  897. *
  898. * Timestamp Wraparound
  899. * 0= No timestamp counter wrap-around
  900. * 1= Timestamp counter wrapped around
  901. */
  902. #define MCAN_IR_TSW_MASK (0x10000UL)
  903. #define MCAN_IR_TSW_SHIFT (16U)
  904. #define MCAN_IR_TSW_SET(x) (((uint32_t)(x) << MCAN_IR_TSW_SHIFT) & MCAN_IR_TSW_MASK)
  905. #define MCAN_IR_TSW_GET(x) (((uint32_t)(x) & MCAN_IR_TSW_MASK) >> MCAN_IR_TSW_SHIFT)
  906. /*
  907. * TEFL (RW)
  908. *
  909. * Tx Event FIFO Element Lost
  910. * 0= No Tx Event FIFO element lost
  911. * 1= Tx Event FIFO element lost, also set after write attempt to Tx Event FIFO of size zero
  912. */
  913. #define MCAN_IR_TEFL_MASK (0x8000U)
  914. #define MCAN_IR_TEFL_SHIFT (15U)
  915. #define MCAN_IR_TEFL_SET(x) (((uint32_t)(x) << MCAN_IR_TEFL_SHIFT) & MCAN_IR_TEFL_MASK)
  916. #define MCAN_IR_TEFL_GET(x) (((uint32_t)(x) & MCAN_IR_TEFL_MASK) >> MCAN_IR_TEFL_SHIFT)
  917. /*
  918. * TEFF (RW)
  919. *
  920. * Tx Event FIFO Full
  921. * 0= Tx Event FIFO not full
  922. * 1= Tx Event FIFO full
  923. */
  924. #define MCAN_IR_TEFF_MASK (0x4000U)
  925. #define MCAN_IR_TEFF_SHIFT (14U)
  926. #define MCAN_IR_TEFF_SET(x) (((uint32_t)(x) << MCAN_IR_TEFF_SHIFT) & MCAN_IR_TEFF_MASK)
  927. #define MCAN_IR_TEFF_GET(x) (((uint32_t)(x) & MCAN_IR_TEFF_MASK) >> MCAN_IR_TEFF_SHIFT)
  928. /*
  929. * TEFW (RW)
  930. *
  931. * Tx Event FIFO Watermark Reached
  932. * 0= Tx Event FIFO fill level below watermark
  933. * 1= Tx Event FIFO fill level reached watermark
  934. */
  935. #define MCAN_IR_TEFW_MASK (0x2000U)
  936. #define MCAN_IR_TEFW_SHIFT (13U)
  937. #define MCAN_IR_TEFW_SET(x) (((uint32_t)(x) << MCAN_IR_TEFW_SHIFT) & MCAN_IR_TEFW_MASK)
  938. #define MCAN_IR_TEFW_GET(x) (((uint32_t)(x) & MCAN_IR_TEFW_MASK) >> MCAN_IR_TEFW_SHIFT)
  939. /*
  940. * TEFN (RW)
  941. *
  942. * Tx Event FIFO New Entry
  943. * 0= Tx Event FIFO unchanged
  944. * 1= Tx Handler wrote Tx Event FIFO element
  945. */
  946. #define MCAN_IR_TEFN_MASK (0x1000U)
  947. #define MCAN_IR_TEFN_SHIFT (12U)
  948. #define MCAN_IR_TEFN_SET(x) (((uint32_t)(x) << MCAN_IR_TEFN_SHIFT) & MCAN_IR_TEFN_MASK)
  949. #define MCAN_IR_TEFN_GET(x) (((uint32_t)(x) & MCAN_IR_TEFN_MASK) >> MCAN_IR_TEFN_SHIFT)
  950. /*
  951. * TFE (RW)
  952. *
  953. * Tx FIFO Empty
  954. * 0= Tx FIFO non-empty
  955. * 1= Tx FIFO empty
  956. */
  957. #define MCAN_IR_TFE_MASK (0x800U)
  958. #define MCAN_IR_TFE_SHIFT (11U)
  959. #define MCAN_IR_TFE_SET(x) (((uint32_t)(x) << MCAN_IR_TFE_SHIFT) & MCAN_IR_TFE_MASK)
  960. #define MCAN_IR_TFE_GET(x) (((uint32_t)(x) & MCAN_IR_TFE_MASK) >> MCAN_IR_TFE_SHIFT)
  961. /*
  962. * TCF (RW)
  963. *
  964. * Transmission Cancellation Finished
  965. * 0= No transmission cancellation finished
  966. * 1= Transmission cancellation finished
  967. */
  968. #define MCAN_IR_TCF_MASK (0x400U)
  969. #define MCAN_IR_TCF_SHIFT (10U)
  970. #define MCAN_IR_TCF_SET(x) (((uint32_t)(x) << MCAN_IR_TCF_SHIFT) & MCAN_IR_TCF_MASK)
  971. #define MCAN_IR_TCF_GET(x) (((uint32_t)(x) & MCAN_IR_TCF_MASK) >> MCAN_IR_TCF_SHIFT)
  972. /*
  973. * TC (RW)
  974. *
  975. * Transmission Completed
  976. * 0= No transmission completed
  977. * 1= Transmission completed
  978. */
  979. #define MCAN_IR_TC_MASK (0x200U)
  980. #define MCAN_IR_TC_SHIFT (9U)
  981. #define MCAN_IR_TC_SET(x) (((uint32_t)(x) << MCAN_IR_TC_SHIFT) & MCAN_IR_TC_MASK)
  982. #define MCAN_IR_TC_GET(x) (((uint32_t)(x) & MCAN_IR_TC_MASK) >> MCAN_IR_TC_SHIFT)
  983. /*
  984. * HPM (RW)
  985. *
  986. * High Priority Message
  987. * 0= No high priority message received
  988. * 1= High priority message received
  989. */
  990. #define MCAN_IR_HPM_MASK (0x100U)
  991. #define MCAN_IR_HPM_SHIFT (8U)
  992. #define MCAN_IR_HPM_SET(x) (((uint32_t)(x) << MCAN_IR_HPM_SHIFT) & MCAN_IR_HPM_MASK)
  993. #define MCAN_IR_HPM_GET(x) (((uint32_t)(x) & MCAN_IR_HPM_MASK) >> MCAN_IR_HPM_SHIFT)
  994. /*
  995. * RF1L (RW)
  996. *
  997. * Rx FIFO 1 Message Lost
  998. * 0= No Rx FIFO 1 message lost
  999. * 1= Rx FIFO 1 message lost, also set after write attempt to Rx FIFO 1 of size zero
  1000. */
  1001. #define MCAN_IR_RF1L_MASK (0x80U)
  1002. #define MCAN_IR_RF1L_SHIFT (7U)
  1003. #define MCAN_IR_RF1L_SET(x) (((uint32_t)(x) << MCAN_IR_RF1L_SHIFT) & MCAN_IR_RF1L_MASK)
  1004. #define MCAN_IR_RF1L_GET(x) (((uint32_t)(x) & MCAN_IR_RF1L_MASK) >> MCAN_IR_RF1L_SHIFT)
  1005. /*
  1006. * RF1F (RW)
  1007. *
  1008. * Rx FIFO 1 Full
  1009. * 0= Rx FIFO 1 not full
  1010. * 1= Rx FIFO 1 full
  1011. */
  1012. #define MCAN_IR_RF1F_MASK (0x40U)
  1013. #define MCAN_IR_RF1F_SHIFT (6U)
  1014. #define MCAN_IR_RF1F_SET(x) (((uint32_t)(x) << MCAN_IR_RF1F_SHIFT) & MCAN_IR_RF1F_MASK)
  1015. #define MCAN_IR_RF1F_GET(x) (((uint32_t)(x) & MCAN_IR_RF1F_MASK) >> MCAN_IR_RF1F_SHIFT)
  1016. /*
  1017. * RF1W (RW)
  1018. *
  1019. * Rx FIFO 1 Watermark Reached
  1020. * 0= Rx FIFO 1 fill level below watermark
  1021. * 1= Rx FIFO 1 fill level reached watermark
  1022. */
  1023. #define MCAN_IR_RF1W_MASK (0x20U)
  1024. #define MCAN_IR_RF1W_SHIFT (5U)
  1025. #define MCAN_IR_RF1W_SET(x) (((uint32_t)(x) << MCAN_IR_RF1W_SHIFT) & MCAN_IR_RF1W_MASK)
  1026. #define MCAN_IR_RF1W_GET(x) (((uint32_t)(x) & MCAN_IR_RF1W_MASK) >> MCAN_IR_RF1W_SHIFT)
  1027. /*
  1028. * RF1N (RW)
  1029. *
  1030. * Rx FIFO 1 New Message
  1031. * 0= No new message written to Rx FIFO 1
  1032. * 1= New message written to Rx FIFO 1
  1033. */
  1034. #define MCAN_IR_RF1N_MASK (0x10U)
  1035. #define MCAN_IR_RF1N_SHIFT (4U)
  1036. #define MCAN_IR_RF1N_SET(x) (((uint32_t)(x) << MCAN_IR_RF1N_SHIFT) & MCAN_IR_RF1N_MASK)
  1037. #define MCAN_IR_RF1N_GET(x) (((uint32_t)(x) & MCAN_IR_RF1N_MASK) >> MCAN_IR_RF1N_SHIFT)
  1038. /*
  1039. * RF0L (RW)
  1040. *
  1041. * Rx FIFO 0 Message Lost
  1042. * 0= No Rx FIFO 0 message lost
  1043. * 1= Rx FIFO 0 message lost, also set after write attempt to Rx FIFO 0 of size zero
  1044. */
  1045. #define MCAN_IR_RF0L_MASK (0x8U)
  1046. #define MCAN_IR_RF0L_SHIFT (3U)
  1047. #define MCAN_IR_RF0L_SET(x) (((uint32_t)(x) << MCAN_IR_RF0L_SHIFT) & MCAN_IR_RF0L_MASK)
  1048. #define MCAN_IR_RF0L_GET(x) (((uint32_t)(x) & MCAN_IR_RF0L_MASK) >> MCAN_IR_RF0L_SHIFT)
  1049. /*
  1050. * RF0F (RW)
  1051. *
  1052. * Rx FIFO 0 Full
  1053. * 0= Rx FIFO 0 not full
  1054. * 1= Rx FIFO 0 full
  1055. */
  1056. #define MCAN_IR_RF0F_MASK (0x4U)
  1057. #define MCAN_IR_RF0F_SHIFT (2U)
  1058. #define MCAN_IR_RF0F_SET(x) (((uint32_t)(x) << MCAN_IR_RF0F_SHIFT) & MCAN_IR_RF0F_MASK)
  1059. #define MCAN_IR_RF0F_GET(x) (((uint32_t)(x) & MCAN_IR_RF0F_MASK) >> MCAN_IR_RF0F_SHIFT)
  1060. /*
  1061. * RF0W (RW)
  1062. *
  1063. * Rx FIFO 0 Watermark Reached
  1064. * 0= Rx FIFO 0 fill level below watermark
  1065. * 1= Rx FIFO 0 fill level reached watermark
  1066. */
  1067. #define MCAN_IR_RF0W_MASK (0x2U)
  1068. #define MCAN_IR_RF0W_SHIFT (1U)
  1069. #define MCAN_IR_RF0W_SET(x) (((uint32_t)(x) << MCAN_IR_RF0W_SHIFT) & MCAN_IR_RF0W_MASK)
  1070. #define MCAN_IR_RF0W_GET(x) (((uint32_t)(x) & MCAN_IR_RF0W_MASK) >> MCAN_IR_RF0W_SHIFT)
  1071. /*
  1072. * RF0N (RW)
  1073. *
  1074. * Rx FIFO 0 New Message
  1075. * 0= No new message written to Rx FIFO 0
  1076. * 1= New message written to Rx FIFO 0
  1077. */
  1078. #define MCAN_IR_RF0N_MASK (0x1U)
  1079. #define MCAN_IR_RF0N_SHIFT (0U)
  1080. #define MCAN_IR_RF0N_SET(x) (((uint32_t)(x) << MCAN_IR_RF0N_SHIFT) & MCAN_IR_RF0N_MASK)
  1081. #define MCAN_IR_RF0N_GET(x) (((uint32_t)(x) & MCAN_IR_RF0N_MASK) >> MCAN_IR_RF0N_SHIFT)
  1082. /* Bitfield definition for register: IE */
  1083. /*
  1084. * ARAE (RW)
  1085. *
  1086. * Access to Reserved Address Enable
  1087. */
  1088. #define MCAN_IE_ARAE_MASK (0x20000000UL)
  1089. #define MCAN_IE_ARAE_SHIFT (29U)
  1090. #define MCAN_IE_ARAE_SET(x) (((uint32_t)(x) << MCAN_IE_ARAE_SHIFT) & MCAN_IE_ARAE_MASK)
  1091. #define MCAN_IE_ARAE_GET(x) (((uint32_t)(x) & MCAN_IE_ARAE_MASK) >> MCAN_IE_ARAE_SHIFT)
  1092. /*
  1093. * PEDE (RW)
  1094. *
  1095. * Protocol Error in Data Phase Enable
  1096. */
  1097. #define MCAN_IE_PEDE_MASK (0x10000000UL)
  1098. #define MCAN_IE_PEDE_SHIFT (28U)
  1099. #define MCAN_IE_PEDE_SET(x) (((uint32_t)(x) << MCAN_IE_PEDE_SHIFT) & MCAN_IE_PEDE_MASK)
  1100. #define MCAN_IE_PEDE_GET(x) (((uint32_t)(x) & MCAN_IE_PEDE_MASK) >> MCAN_IE_PEDE_SHIFT)
  1101. /*
  1102. * PEAE (RW)
  1103. *
  1104. * Protocol Error in Arbitration Phase Enable
  1105. */
  1106. #define MCAN_IE_PEAE_MASK (0x8000000UL)
  1107. #define MCAN_IE_PEAE_SHIFT (27U)
  1108. #define MCAN_IE_PEAE_SET(x) (((uint32_t)(x) << MCAN_IE_PEAE_SHIFT) & MCAN_IE_PEAE_MASK)
  1109. #define MCAN_IE_PEAE_GET(x) (((uint32_t)(x) & MCAN_IE_PEAE_MASK) >> MCAN_IE_PEAE_SHIFT)
  1110. /*
  1111. * WDIE (RW)
  1112. *
  1113. * Watchdog Interrupt Enable
  1114. */
  1115. #define MCAN_IE_WDIE_MASK (0x4000000UL)
  1116. #define MCAN_IE_WDIE_SHIFT (26U)
  1117. #define MCAN_IE_WDIE_SET(x) (((uint32_t)(x) << MCAN_IE_WDIE_SHIFT) & MCAN_IE_WDIE_MASK)
  1118. #define MCAN_IE_WDIE_GET(x) (((uint32_t)(x) & MCAN_IE_WDIE_MASK) >> MCAN_IE_WDIE_SHIFT)
  1119. /*
  1120. * BOE (RW)
  1121. *
  1122. * Bus_Off Status Interrupt Enable
  1123. */
  1124. #define MCAN_IE_BOE_MASK (0x2000000UL)
  1125. #define MCAN_IE_BOE_SHIFT (25U)
  1126. #define MCAN_IE_BOE_SET(x) (((uint32_t)(x) << MCAN_IE_BOE_SHIFT) & MCAN_IE_BOE_MASK)
  1127. #define MCAN_IE_BOE_GET(x) (((uint32_t)(x) & MCAN_IE_BOE_MASK) >> MCAN_IE_BOE_SHIFT)
  1128. /*
  1129. * EWE (RW)
  1130. *
  1131. * Warning Status Interrupt Enable
  1132. */
  1133. #define MCAN_IE_EWE_MASK (0x1000000UL)
  1134. #define MCAN_IE_EWE_SHIFT (24U)
  1135. #define MCAN_IE_EWE_SET(x) (((uint32_t)(x) << MCAN_IE_EWE_SHIFT) & MCAN_IE_EWE_MASK)
  1136. #define MCAN_IE_EWE_GET(x) (((uint32_t)(x) & MCAN_IE_EWE_MASK) >> MCAN_IE_EWE_SHIFT)
  1137. /*
  1138. * EPE (RW)
  1139. *
  1140. * Error Passive Interrupt Enable
  1141. */
  1142. #define MCAN_IE_EPE_MASK (0x800000UL)
  1143. #define MCAN_IE_EPE_SHIFT (23U)
  1144. #define MCAN_IE_EPE_SET(x) (((uint32_t)(x) << MCAN_IE_EPE_SHIFT) & MCAN_IE_EPE_MASK)
  1145. #define MCAN_IE_EPE_GET(x) (((uint32_t)(x) & MCAN_IE_EPE_MASK) >> MCAN_IE_EPE_SHIFT)
  1146. /*
  1147. * ELOE (RW)
  1148. *
  1149. * Error Logging Overflow Interrupt Enable
  1150. */
  1151. #define MCAN_IE_ELOE_MASK (0x400000UL)
  1152. #define MCAN_IE_ELOE_SHIFT (22U)
  1153. #define MCAN_IE_ELOE_SET(x) (((uint32_t)(x) << MCAN_IE_ELOE_SHIFT) & MCAN_IE_ELOE_MASK)
  1154. #define MCAN_IE_ELOE_GET(x) (((uint32_t)(x) & MCAN_IE_ELOE_MASK) >> MCAN_IE_ELOE_SHIFT)
  1155. /*
  1156. * BEUE (RW)
  1157. *
  1158. * Bit Error Uncorrected Interrupt Enable
  1159. */
  1160. #define MCAN_IE_BEUE_MASK (0x200000UL)
  1161. #define MCAN_IE_BEUE_SHIFT (21U)
  1162. #define MCAN_IE_BEUE_SET(x) (((uint32_t)(x) << MCAN_IE_BEUE_SHIFT) & MCAN_IE_BEUE_MASK)
  1163. #define MCAN_IE_BEUE_GET(x) (((uint32_t)(x) & MCAN_IE_BEUE_MASK) >> MCAN_IE_BEUE_SHIFT)
  1164. /*
  1165. * BECE (RW)
  1166. *
  1167. * Bit Error Corrected Interrupt Enable
  1168. */
  1169. #define MCAN_IE_BECE_MASK (0x100000UL)
  1170. #define MCAN_IE_BECE_SHIFT (20U)
  1171. #define MCAN_IE_BECE_SET(x) (((uint32_t)(x) << MCAN_IE_BECE_SHIFT) & MCAN_IE_BECE_MASK)
  1172. #define MCAN_IE_BECE_GET(x) (((uint32_t)(x) & MCAN_IE_BECE_MASK) >> MCAN_IE_BECE_SHIFT)
  1173. /*
  1174. * DRXE (RW)
  1175. *
  1176. * Message stored to Dedicated Rx Buffer Interrupt Enable
  1177. */
  1178. #define MCAN_IE_DRXE_MASK (0x80000UL)
  1179. #define MCAN_IE_DRXE_SHIFT (19U)
  1180. #define MCAN_IE_DRXE_SET(x) (((uint32_t)(x) << MCAN_IE_DRXE_SHIFT) & MCAN_IE_DRXE_MASK)
  1181. #define MCAN_IE_DRXE_GET(x) (((uint32_t)(x) & MCAN_IE_DRXE_MASK) >> MCAN_IE_DRXE_SHIFT)
  1182. /*
  1183. * TOOE (RW)
  1184. *
  1185. * Timeout Occurred Interrupt Enable
  1186. */
  1187. #define MCAN_IE_TOOE_MASK (0x40000UL)
  1188. #define MCAN_IE_TOOE_SHIFT (18U)
  1189. #define MCAN_IE_TOOE_SET(x) (((uint32_t)(x) << MCAN_IE_TOOE_SHIFT) & MCAN_IE_TOOE_MASK)
  1190. #define MCAN_IE_TOOE_GET(x) (((uint32_t)(x) & MCAN_IE_TOOE_MASK) >> MCAN_IE_TOOE_SHIFT)
  1191. /*
  1192. * MRAFE (RW)
  1193. *
  1194. * Message RAM Access Failure Interrupt Enable
  1195. */
  1196. #define MCAN_IE_MRAFE_MASK (0x20000UL)
  1197. #define MCAN_IE_MRAFE_SHIFT (17U)
  1198. #define MCAN_IE_MRAFE_SET(x) (((uint32_t)(x) << MCAN_IE_MRAFE_SHIFT) & MCAN_IE_MRAFE_MASK)
  1199. #define MCAN_IE_MRAFE_GET(x) (((uint32_t)(x) & MCAN_IE_MRAFE_MASK) >> MCAN_IE_MRAFE_SHIFT)
  1200. /*
  1201. * TSWE (RW)
  1202. *
  1203. * Timestamp Wraparound Interrupt Enable
  1204. */
  1205. #define MCAN_IE_TSWE_MASK (0x10000UL)
  1206. #define MCAN_IE_TSWE_SHIFT (16U)
  1207. #define MCAN_IE_TSWE_SET(x) (((uint32_t)(x) << MCAN_IE_TSWE_SHIFT) & MCAN_IE_TSWE_MASK)
  1208. #define MCAN_IE_TSWE_GET(x) (((uint32_t)(x) & MCAN_IE_TSWE_MASK) >> MCAN_IE_TSWE_SHIFT)
  1209. /*
  1210. * TEFLE (RW)
  1211. *
  1212. * Tx Event FIFO Event Lost Interrupt Enable
  1213. */
  1214. #define MCAN_IE_TEFLE_MASK (0x8000U)
  1215. #define MCAN_IE_TEFLE_SHIFT (15U)
  1216. #define MCAN_IE_TEFLE_SET(x) (((uint32_t)(x) << MCAN_IE_TEFLE_SHIFT) & MCAN_IE_TEFLE_MASK)
  1217. #define MCAN_IE_TEFLE_GET(x) (((uint32_t)(x) & MCAN_IE_TEFLE_MASK) >> MCAN_IE_TEFLE_SHIFT)
  1218. /*
  1219. * TEFFE (RW)
  1220. *
  1221. * Tx Event FIFO Full Interrupt Enable
  1222. */
  1223. #define MCAN_IE_TEFFE_MASK (0x4000U)
  1224. #define MCAN_IE_TEFFE_SHIFT (14U)
  1225. #define MCAN_IE_TEFFE_SET(x) (((uint32_t)(x) << MCAN_IE_TEFFE_SHIFT) & MCAN_IE_TEFFE_MASK)
  1226. #define MCAN_IE_TEFFE_GET(x) (((uint32_t)(x) & MCAN_IE_TEFFE_MASK) >> MCAN_IE_TEFFE_SHIFT)
  1227. /*
  1228. * TEFWE (RW)
  1229. *
  1230. * Tx Event FIFO Watermark Reached Interrupt Enable
  1231. */
  1232. #define MCAN_IE_TEFWE_MASK (0x2000U)
  1233. #define MCAN_IE_TEFWE_SHIFT (13U)
  1234. #define MCAN_IE_TEFWE_SET(x) (((uint32_t)(x) << MCAN_IE_TEFWE_SHIFT) & MCAN_IE_TEFWE_MASK)
  1235. #define MCAN_IE_TEFWE_GET(x) (((uint32_t)(x) & MCAN_IE_TEFWE_MASK) >> MCAN_IE_TEFWE_SHIFT)
  1236. /*
  1237. * TEFNE (RW)
  1238. *
  1239. * Tx Event FIFO New Entry Interrupt Enable
  1240. */
  1241. #define MCAN_IE_TEFNE_MASK (0x1000U)
  1242. #define MCAN_IE_TEFNE_SHIFT (12U)
  1243. #define MCAN_IE_TEFNE_SET(x) (((uint32_t)(x) << MCAN_IE_TEFNE_SHIFT) & MCAN_IE_TEFNE_MASK)
  1244. #define MCAN_IE_TEFNE_GET(x) (((uint32_t)(x) & MCAN_IE_TEFNE_MASK) >> MCAN_IE_TEFNE_SHIFT)
  1245. /*
  1246. * TFEE (RW)
  1247. *
  1248. * Tx FIFO Empty Interrupt Enable
  1249. */
  1250. #define MCAN_IE_TFEE_MASK (0x800U)
  1251. #define MCAN_IE_TFEE_SHIFT (11U)
  1252. #define MCAN_IE_TFEE_SET(x) (((uint32_t)(x) << MCAN_IE_TFEE_SHIFT) & MCAN_IE_TFEE_MASK)
  1253. #define MCAN_IE_TFEE_GET(x) (((uint32_t)(x) & MCAN_IE_TFEE_MASK) >> MCAN_IE_TFEE_SHIFT)
  1254. /*
  1255. * TCFE (RW)
  1256. *
  1257. * Transmission Cancellation Finished Interrupt Enable
  1258. */
  1259. #define MCAN_IE_TCFE_MASK (0x400U)
  1260. #define MCAN_IE_TCFE_SHIFT (10U)
  1261. #define MCAN_IE_TCFE_SET(x) (((uint32_t)(x) << MCAN_IE_TCFE_SHIFT) & MCAN_IE_TCFE_MASK)
  1262. #define MCAN_IE_TCFE_GET(x) (((uint32_t)(x) & MCAN_IE_TCFE_MASK) >> MCAN_IE_TCFE_SHIFT)
  1263. /*
  1264. * TCE (RW)
  1265. *
  1266. * Transmission Completed Interrupt Enable
  1267. */
  1268. #define MCAN_IE_TCE_MASK (0x200U)
  1269. #define MCAN_IE_TCE_SHIFT (9U)
  1270. #define MCAN_IE_TCE_SET(x) (((uint32_t)(x) << MCAN_IE_TCE_SHIFT) & MCAN_IE_TCE_MASK)
  1271. #define MCAN_IE_TCE_GET(x) (((uint32_t)(x) & MCAN_IE_TCE_MASK) >> MCAN_IE_TCE_SHIFT)
  1272. /*
  1273. * HPME (RW)
  1274. *
  1275. * High Priority Message Interrupt Enable
  1276. */
  1277. #define MCAN_IE_HPME_MASK (0x100U)
  1278. #define MCAN_IE_HPME_SHIFT (8U)
  1279. #define MCAN_IE_HPME_SET(x) (((uint32_t)(x) << MCAN_IE_HPME_SHIFT) & MCAN_IE_HPME_MASK)
  1280. #define MCAN_IE_HPME_GET(x) (((uint32_t)(x) & MCAN_IE_HPME_MASK) >> MCAN_IE_HPME_SHIFT)
  1281. /*
  1282. * RF1LE (RW)
  1283. *
  1284. * Rx FIFO 1 Message Lost Interrupt Enable
  1285. */
  1286. #define MCAN_IE_RF1LE_MASK (0x80U)
  1287. #define MCAN_IE_RF1LE_SHIFT (7U)
  1288. #define MCAN_IE_RF1LE_SET(x) (((uint32_t)(x) << MCAN_IE_RF1LE_SHIFT) & MCAN_IE_RF1LE_MASK)
  1289. #define MCAN_IE_RF1LE_GET(x) (((uint32_t)(x) & MCAN_IE_RF1LE_MASK) >> MCAN_IE_RF1LE_SHIFT)
  1290. /*
  1291. * RF1FE (RW)
  1292. *
  1293. * Rx FIFO 1 Full Interrupt Enable
  1294. */
  1295. #define MCAN_IE_RF1FE_MASK (0x40U)
  1296. #define MCAN_IE_RF1FE_SHIFT (6U)
  1297. #define MCAN_IE_RF1FE_SET(x) (((uint32_t)(x) << MCAN_IE_RF1FE_SHIFT) & MCAN_IE_RF1FE_MASK)
  1298. #define MCAN_IE_RF1FE_GET(x) (((uint32_t)(x) & MCAN_IE_RF1FE_MASK) >> MCAN_IE_RF1FE_SHIFT)
  1299. /*
  1300. * RF1WE (RW)
  1301. *
  1302. * Rx FIFO 1 Watermark Reached Interrupt Enable
  1303. */
  1304. #define MCAN_IE_RF1WE_MASK (0x20U)
  1305. #define MCAN_IE_RF1WE_SHIFT (5U)
  1306. #define MCAN_IE_RF1WE_SET(x) (((uint32_t)(x) << MCAN_IE_RF1WE_SHIFT) & MCAN_IE_RF1WE_MASK)
  1307. #define MCAN_IE_RF1WE_GET(x) (((uint32_t)(x) & MCAN_IE_RF1WE_MASK) >> MCAN_IE_RF1WE_SHIFT)
  1308. /*
  1309. * RF1NE (RW)
  1310. *
  1311. * Rx FIFO 1 New Message Interrupt Enable
  1312. */
  1313. #define MCAN_IE_RF1NE_MASK (0x10U)
  1314. #define MCAN_IE_RF1NE_SHIFT (4U)
  1315. #define MCAN_IE_RF1NE_SET(x) (((uint32_t)(x) << MCAN_IE_RF1NE_SHIFT) & MCAN_IE_RF1NE_MASK)
  1316. #define MCAN_IE_RF1NE_GET(x) (((uint32_t)(x) & MCAN_IE_RF1NE_MASK) >> MCAN_IE_RF1NE_SHIFT)
  1317. /*
  1318. * RF0LE (RW)
  1319. *
  1320. * Rx FIFO 0 Message Lost Interrupt Enable
  1321. */
  1322. #define MCAN_IE_RF0LE_MASK (0x8U)
  1323. #define MCAN_IE_RF0LE_SHIFT (3U)
  1324. #define MCAN_IE_RF0LE_SET(x) (((uint32_t)(x) << MCAN_IE_RF0LE_SHIFT) & MCAN_IE_RF0LE_MASK)
  1325. #define MCAN_IE_RF0LE_GET(x) (((uint32_t)(x) & MCAN_IE_RF0LE_MASK) >> MCAN_IE_RF0LE_SHIFT)
  1326. /*
  1327. * RF0FE (RW)
  1328. *
  1329. * Rx FIFO 0 Full Interrupt Enable
  1330. */
  1331. #define MCAN_IE_RF0FE_MASK (0x4U)
  1332. #define MCAN_IE_RF0FE_SHIFT (2U)
  1333. #define MCAN_IE_RF0FE_SET(x) (((uint32_t)(x) << MCAN_IE_RF0FE_SHIFT) & MCAN_IE_RF0FE_MASK)
  1334. #define MCAN_IE_RF0FE_GET(x) (((uint32_t)(x) & MCAN_IE_RF0FE_MASK) >> MCAN_IE_RF0FE_SHIFT)
  1335. /*
  1336. * RF0WE (RW)
  1337. *
  1338. * Rx FIFO 0 Watermark Reached Interrupt Enable
  1339. */
  1340. #define MCAN_IE_RF0WE_MASK (0x2U)
  1341. #define MCAN_IE_RF0WE_SHIFT (1U)
  1342. #define MCAN_IE_RF0WE_SET(x) (((uint32_t)(x) << MCAN_IE_RF0WE_SHIFT) & MCAN_IE_RF0WE_MASK)
  1343. #define MCAN_IE_RF0WE_GET(x) (((uint32_t)(x) & MCAN_IE_RF0WE_MASK) >> MCAN_IE_RF0WE_SHIFT)
  1344. /*
  1345. * RF0NE (RW)
  1346. *
  1347. * Rx FIFO 0 New Message Interrupt Enable
  1348. */
  1349. #define MCAN_IE_RF0NE_MASK (0x1U)
  1350. #define MCAN_IE_RF0NE_SHIFT (0U)
  1351. #define MCAN_IE_RF0NE_SET(x) (((uint32_t)(x) << MCAN_IE_RF0NE_SHIFT) & MCAN_IE_RF0NE_MASK)
  1352. #define MCAN_IE_RF0NE_GET(x) (((uint32_t)(x) & MCAN_IE_RF0NE_MASK) >> MCAN_IE_RF0NE_SHIFT)
  1353. /* Bitfield definition for register: ILS */
  1354. /*
  1355. * ARAL (RW)
  1356. *
  1357. * Access to Reserved Address Line
  1358. */
  1359. #define MCAN_ILS_ARAL_MASK (0x20000000UL)
  1360. #define MCAN_ILS_ARAL_SHIFT (29U)
  1361. #define MCAN_ILS_ARAL_SET(x) (((uint32_t)(x) << MCAN_ILS_ARAL_SHIFT) & MCAN_ILS_ARAL_MASK)
  1362. #define MCAN_ILS_ARAL_GET(x) (((uint32_t)(x) & MCAN_ILS_ARAL_MASK) >> MCAN_ILS_ARAL_SHIFT)
  1363. /*
  1364. * PEDL (RW)
  1365. *
  1366. * Protocol Error in Data Phase Line
  1367. */
  1368. #define MCAN_ILS_PEDL_MASK (0x10000000UL)
  1369. #define MCAN_ILS_PEDL_SHIFT (28U)
  1370. #define MCAN_ILS_PEDL_SET(x) (((uint32_t)(x) << MCAN_ILS_PEDL_SHIFT) & MCAN_ILS_PEDL_MASK)
  1371. #define MCAN_ILS_PEDL_GET(x) (((uint32_t)(x) & MCAN_ILS_PEDL_MASK) >> MCAN_ILS_PEDL_SHIFT)
  1372. /*
  1373. * PEAL (RW)
  1374. *
  1375. * Protocol Error in Arbitration Phase Line
  1376. */
  1377. #define MCAN_ILS_PEAL_MASK (0x8000000UL)
  1378. #define MCAN_ILS_PEAL_SHIFT (27U)
  1379. #define MCAN_ILS_PEAL_SET(x) (((uint32_t)(x) << MCAN_ILS_PEAL_SHIFT) & MCAN_ILS_PEAL_MASK)
  1380. #define MCAN_ILS_PEAL_GET(x) (((uint32_t)(x) & MCAN_ILS_PEAL_MASK) >> MCAN_ILS_PEAL_SHIFT)
  1381. /*
  1382. * WDIL (RW)
  1383. *
  1384. * Watchdog Interrupt Line
  1385. */
  1386. #define MCAN_ILS_WDIL_MASK (0x4000000UL)
  1387. #define MCAN_ILS_WDIL_SHIFT (26U)
  1388. #define MCAN_ILS_WDIL_SET(x) (((uint32_t)(x) << MCAN_ILS_WDIL_SHIFT) & MCAN_ILS_WDIL_MASK)
  1389. #define MCAN_ILS_WDIL_GET(x) (((uint32_t)(x) & MCAN_ILS_WDIL_MASK) >> MCAN_ILS_WDIL_SHIFT)
  1390. /*
  1391. * BOL (RW)
  1392. *
  1393. * Bus_Off Status Interrupt Line
  1394. */
  1395. #define MCAN_ILS_BOL_MASK (0x2000000UL)
  1396. #define MCAN_ILS_BOL_SHIFT (25U)
  1397. #define MCAN_ILS_BOL_SET(x) (((uint32_t)(x) << MCAN_ILS_BOL_SHIFT) & MCAN_ILS_BOL_MASK)
  1398. #define MCAN_ILS_BOL_GET(x) (((uint32_t)(x) & MCAN_ILS_BOL_MASK) >> MCAN_ILS_BOL_SHIFT)
  1399. /*
  1400. * EWL (RW)
  1401. *
  1402. * Warning Status Interrupt Line
  1403. */
  1404. #define MCAN_ILS_EWL_MASK (0x1000000UL)
  1405. #define MCAN_ILS_EWL_SHIFT (24U)
  1406. #define MCAN_ILS_EWL_SET(x) (((uint32_t)(x) << MCAN_ILS_EWL_SHIFT) & MCAN_ILS_EWL_MASK)
  1407. #define MCAN_ILS_EWL_GET(x) (((uint32_t)(x) & MCAN_ILS_EWL_MASK) >> MCAN_ILS_EWL_SHIFT)
  1408. /*
  1409. * EPL (RW)
  1410. *
  1411. * Error Passive Interrupt Line
  1412. */
  1413. #define MCAN_ILS_EPL_MASK (0x800000UL)
  1414. #define MCAN_ILS_EPL_SHIFT (23U)
  1415. #define MCAN_ILS_EPL_SET(x) (((uint32_t)(x) << MCAN_ILS_EPL_SHIFT) & MCAN_ILS_EPL_MASK)
  1416. #define MCAN_ILS_EPL_GET(x) (((uint32_t)(x) & MCAN_ILS_EPL_MASK) >> MCAN_ILS_EPL_SHIFT)
  1417. /*
  1418. * ELOL (RW)
  1419. *
  1420. * Error Logging Overflow Interrupt Line
  1421. */
  1422. #define MCAN_ILS_ELOL_MASK (0x400000UL)
  1423. #define MCAN_ILS_ELOL_SHIFT (22U)
  1424. #define MCAN_ILS_ELOL_SET(x) (((uint32_t)(x) << MCAN_ILS_ELOL_SHIFT) & MCAN_ILS_ELOL_MASK)
  1425. #define MCAN_ILS_ELOL_GET(x) (((uint32_t)(x) & MCAN_ILS_ELOL_MASK) >> MCAN_ILS_ELOL_SHIFT)
  1426. /*
  1427. * BEUL (RW)
  1428. *
  1429. * Bit Error Uncorrected Interrupt Line
  1430. */
  1431. #define MCAN_ILS_BEUL_MASK (0x200000UL)
  1432. #define MCAN_ILS_BEUL_SHIFT (21U)
  1433. #define MCAN_ILS_BEUL_SET(x) (((uint32_t)(x) << MCAN_ILS_BEUL_SHIFT) & MCAN_ILS_BEUL_MASK)
  1434. #define MCAN_ILS_BEUL_GET(x) (((uint32_t)(x) & MCAN_ILS_BEUL_MASK) >> MCAN_ILS_BEUL_SHIFT)
  1435. /*
  1436. * BECL (RW)
  1437. *
  1438. * Bit Error Corrected Interrupt Line
  1439. */
  1440. #define MCAN_ILS_BECL_MASK (0x100000UL)
  1441. #define MCAN_ILS_BECL_SHIFT (20U)
  1442. #define MCAN_ILS_BECL_SET(x) (((uint32_t)(x) << MCAN_ILS_BECL_SHIFT) & MCAN_ILS_BECL_MASK)
  1443. #define MCAN_ILS_BECL_GET(x) (((uint32_t)(x) & MCAN_ILS_BECL_MASK) >> MCAN_ILS_BECL_SHIFT)
  1444. /*
  1445. * DRXL (RW)
  1446. *
  1447. * Message stored to Dedicated Rx Buffer Interrupt Line
  1448. */
  1449. #define MCAN_ILS_DRXL_MASK (0x80000UL)
  1450. #define MCAN_ILS_DRXL_SHIFT (19U)
  1451. #define MCAN_ILS_DRXL_SET(x) (((uint32_t)(x) << MCAN_ILS_DRXL_SHIFT) & MCAN_ILS_DRXL_MASK)
  1452. #define MCAN_ILS_DRXL_GET(x) (((uint32_t)(x) & MCAN_ILS_DRXL_MASK) >> MCAN_ILS_DRXL_SHIFT)
  1453. /*
  1454. * TOOL (RW)
  1455. *
  1456. * Timeout Occurred Interrupt Line
  1457. */
  1458. #define MCAN_ILS_TOOL_MASK (0x40000UL)
  1459. #define MCAN_ILS_TOOL_SHIFT (18U)
  1460. #define MCAN_ILS_TOOL_SET(x) (((uint32_t)(x) << MCAN_ILS_TOOL_SHIFT) & MCAN_ILS_TOOL_MASK)
  1461. #define MCAN_ILS_TOOL_GET(x) (((uint32_t)(x) & MCAN_ILS_TOOL_MASK) >> MCAN_ILS_TOOL_SHIFT)
  1462. /*
  1463. * MRAFL (RW)
  1464. *
  1465. * Message RAM Access Failure Interrupt Line
  1466. */
  1467. #define MCAN_ILS_MRAFL_MASK (0x20000UL)
  1468. #define MCAN_ILS_MRAFL_SHIFT (17U)
  1469. #define MCAN_ILS_MRAFL_SET(x) (((uint32_t)(x) << MCAN_ILS_MRAFL_SHIFT) & MCAN_ILS_MRAFL_MASK)
  1470. #define MCAN_ILS_MRAFL_GET(x) (((uint32_t)(x) & MCAN_ILS_MRAFL_MASK) >> MCAN_ILS_MRAFL_SHIFT)
  1471. /*
  1472. * TSWL (RW)
  1473. *
  1474. * Timestamp Wraparound Interrupt Line
  1475. */
  1476. #define MCAN_ILS_TSWL_MASK (0x10000UL)
  1477. #define MCAN_ILS_TSWL_SHIFT (16U)
  1478. #define MCAN_ILS_TSWL_SET(x) (((uint32_t)(x) << MCAN_ILS_TSWL_SHIFT) & MCAN_ILS_TSWL_MASK)
  1479. #define MCAN_ILS_TSWL_GET(x) (((uint32_t)(x) & MCAN_ILS_TSWL_MASK) >> MCAN_ILS_TSWL_SHIFT)
  1480. /*
  1481. * TEFLL (RW)
  1482. *
  1483. * Tx Event FIFO Event Lost Interrupt Line
  1484. */
  1485. #define MCAN_ILS_TEFLL_MASK (0x8000U)
  1486. #define MCAN_ILS_TEFLL_SHIFT (15U)
  1487. #define MCAN_ILS_TEFLL_SET(x) (((uint32_t)(x) << MCAN_ILS_TEFLL_SHIFT) & MCAN_ILS_TEFLL_MASK)
  1488. #define MCAN_ILS_TEFLL_GET(x) (((uint32_t)(x) & MCAN_ILS_TEFLL_MASK) >> MCAN_ILS_TEFLL_SHIFT)
  1489. /*
  1490. * TEFFL (RW)
  1491. *
  1492. * Tx Event FIFO Full Interrupt Line
  1493. */
  1494. #define MCAN_ILS_TEFFL_MASK (0x4000U)
  1495. #define MCAN_ILS_TEFFL_SHIFT (14U)
  1496. #define MCAN_ILS_TEFFL_SET(x) (((uint32_t)(x) << MCAN_ILS_TEFFL_SHIFT) & MCAN_ILS_TEFFL_MASK)
  1497. #define MCAN_ILS_TEFFL_GET(x) (((uint32_t)(x) & MCAN_ILS_TEFFL_MASK) >> MCAN_ILS_TEFFL_SHIFT)
  1498. /*
  1499. * TEFWL (RW)
  1500. *
  1501. * Tx Event FIFO Watermark Reached Interrupt Line
  1502. */
  1503. #define MCAN_ILS_TEFWL_MASK (0x2000U)
  1504. #define MCAN_ILS_TEFWL_SHIFT (13U)
  1505. #define MCAN_ILS_TEFWL_SET(x) (((uint32_t)(x) << MCAN_ILS_TEFWL_SHIFT) & MCAN_ILS_TEFWL_MASK)
  1506. #define MCAN_ILS_TEFWL_GET(x) (((uint32_t)(x) & MCAN_ILS_TEFWL_MASK) >> MCAN_ILS_TEFWL_SHIFT)
  1507. /*
  1508. * TEFNL (RW)
  1509. *
  1510. * Tx Event FIFO New Entry Interrupt Line
  1511. */
  1512. #define MCAN_ILS_TEFNL_MASK (0x1000U)
  1513. #define MCAN_ILS_TEFNL_SHIFT (12U)
  1514. #define MCAN_ILS_TEFNL_SET(x) (((uint32_t)(x) << MCAN_ILS_TEFNL_SHIFT) & MCAN_ILS_TEFNL_MASK)
  1515. #define MCAN_ILS_TEFNL_GET(x) (((uint32_t)(x) & MCAN_ILS_TEFNL_MASK) >> MCAN_ILS_TEFNL_SHIFT)
  1516. /*
  1517. * TFEL (RW)
  1518. *
  1519. * Tx FIFO Empty Interrupt Line
  1520. */
  1521. #define MCAN_ILS_TFEL_MASK (0x800U)
  1522. #define MCAN_ILS_TFEL_SHIFT (11U)
  1523. #define MCAN_ILS_TFEL_SET(x) (((uint32_t)(x) << MCAN_ILS_TFEL_SHIFT) & MCAN_ILS_TFEL_MASK)
  1524. #define MCAN_ILS_TFEL_GET(x) (((uint32_t)(x) & MCAN_ILS_TFEL_MASK) >> MCAN_ILS_TFEL_SHIFT)
  1525. /*
  1526. * TCFL (RW)
  1527. *
  1528. * Transmission Cancellation Finished Interrupt Line
  1529. */
  1530. #define MCAN_ILS_TCFL_MASK (0x400U)
  1531. #define MCAN_ILS_TCFL_SHIFT (10U)
  1532. #define MCAN_ILS_TCFL_SET(x) (((uint32_t)(x) << MCAN_ILS_TCFL_SHIFT) & MCAN_ILS_TCFL_MASK)
  1533. #define MCAN_ILS_TCFL_GET(x) (((uint32_t)(x) & MCAN_ILS_TCFL_MASK) >> MCAN_ILS_TCFL_SHIFT)
  1534. /*
  1535. * TCL (RW)
  1536. *
  1537. * Transmission Completed Interrupt Line
  1538. */
  1539. #define MCAN_ILS_TCL_MASK (0x200U)
  1540. #define MCAN_ILS_TCL_SHIFT (9U)
  1541. #define MCAN_ILS_TCL_SET(x) (((uint32_t)(x) << MCAN_ILS_TCL_SHIFT) & MCAN_ILS_TCL_MASK)
  1542. #define MCAN_ILS_TCL_GET(x) (((uint32_t)(x) & MCAN_ILS_TCL_MASK) >> MCAN_ILS_TCL_SHIFT)
  1543. /*
  1544. * HPML (RW)
  1545. *
  1546. * High Priority Message Interrupt Line
  1547. */
  1548. #define MCAN_ILS_HPML_MASK (0x100U)
  1549. #define MCAN_ILS_HPML_SHIFT (8U)
  1550. #define MCAN_ILS_HPML_SET(x) (((uint32_t)(x) << MCAN_ILS_HPML_SHIFT) & MCAN_ILS_HPML_MASK)
  1551. #define MCAN_ILS_HPML_GET(x) (((uint32_t)(x) & MCAN_ILS_HPML_MASK) >> MCAN_ILS_HPML_SHIFT)
  1552. /*
  1553. * RF1LL (RW)
  1554. *
  1555. * Rx FIFO 1 Message Lost Interrupt Line
  1556. */
  1557. #define MCAN_ILS_RF1LL_MASK (0x80U)
  1558. #define MCAN_ILS_RF1LL_SHIFT (7U)
  1559. #define MCAN_ILS_RF1LL_SET(x) (((uint32_t)(x) << MCAN_ILS_RF1LL_SHIFT) & MCAN_ILS_RF1LL_MASK)
  1560. #define MCAN_ILS_RF1LL_GET(x) (((uint32_t)(x) & MCAN_ILS_RF1LL_MASK) >> MCAN_ILS_RF1LL_SHIFT)
  1561. /*
  1562. * RF1FL (RW)
  1563. *
  1564. * Rx FIFO 1 Full Interrupt Line
  1565. */
  1566. #define MCAN_ILS_RF1FL_MASK (0x40U)
  1567. #define MCAN_ILS_RF1FL_SHIFT (6U)
  1568. #define MCAN_ILS_RF1FL_SET(x) (((uint32_t)(x) << MCAN_ILS_RF1FL_SHIFT) & MCAN_ILS_RF1FL_MASK)
  1569. #define MCAN_ILS_RF1FL_GET(x) (((uint32_t)(x) & MCAN_ILS_RF1FL_MASK) >> MCAN_ILS_RF1FL_SHIFT)
  1570. /*
  1571. * RF1WL (RW)
  1572. *
  1573. * Rx FIFO 1 Watermark Reached Interrupt Line
  1574. */
  1575. #define MCAN_ILS_RF1WL_MASK (0x20U)
  1576. #define MCAN_ILS_RF1WL_SHIFT (5U)
  1577. #define MCAN_ILS_RF1WL_SET(x) (((uint32_t)(x) << MCAN_ILS_RF1WL_SHIFT) & MCAN_ILS_RF1WL_MASK)
  1578. #define MCAN_ILS_RF1WL_GET(x) (((uint32_t)(x) & MCAN_ILS_RF1WL_MASK) >> MCAN_ILS_RF1WL_SHIFT)
  1579. /*
  1580. * RF1NL (RW)
  1581. *
  1582. * Rx FIFO 1 New Message Interrupt Line
  1583. */
  1584. #define MCAN_ILS_RF1NL_MASK (0x10U)
  1585. #define MCAN_ILS_RF1NL_SHIFT (4U)
  1586. #define MCAN_ILS_RF1NL_SET(x) (((uint32_t)(x) << MCAN_ILS_RF1NL_SHIFT) & MCAN_ILS_RF1NL_MASK)
  1587. #define MCAN_ILS_RF1NL_GET(x) (((uint32_t)(x) & MCAN_ILS_RF1NL_MASK) >> MCAN_ILS_RF1NL_SHIFT)
  1588. /*
  1589. * RF0LL (RW)
  1590. *
  1591. * Rx FIFO 0 Message Lost Interrupt Line
  1592. */
  1593. #define MCAN_ILS_RF0LL_MASK (0x8U)
  1594. #define MCAN_ILS_RF0LL_SHIFT (3U)
  1595. #define MCAN_ILS_RF0LL_SET(x) (((uint32_t)(x) << MCAN_ILS_RF0LL_SHIFT) & MCAN_ILS_RF0LL_MASK)
  1596. #define MCAN_ILS_RF0LL_GET(x) (((uint32_t)(x) & MCAN_ILS_RF0LL_MASK) >> MCAN_ILS_RF0LL_SHIFT)
  1597. /*
  1598. * RF0FL (RW)
  1599. *
  1600. * Rx FIFO 0 Full Interrupt Line
  1601. */
  1602. #define MCAN_ILS_RF0FL_MASK (0x4U)
  1603. #define MCAN_ILS_RF0FL_SHIFT (2U)
  1604. #define MCAN_ILS_RF0FL_SET(x) (((uint32_t)(x) << MCAN_ILS_RF0FL_SHIFT) & MCAN_ILS_RF0FL_MASK)
  1605. #define MCAN_ILS_RF0FL_GET(x) (((uint32_t)(x) & MCAN_ILS_RF0FL_MASK) >> MCAN_ILS_RF0FL_SHIFT)
  1606. /*
  1607. * RF0WL (RW)
  1608. *
  1609. * Rx FIFO 0 Watermark Reached Interrupt Line
  1610. */
  1611. #define MCAN_ILS_RF0WL_MASK (0x2U)
  1612. #define MCAN_ILS_RF0WL_SHIFT (1U)
  1613. #define MCAN_ILS_RF0WL_SET(x) (((uint32_t)(x) << MCAN_ILS_RF0WL_SHIFT) & MCAN_ILS_RF0WL_MASK)
  1614. #define MCAN_ILS_RF0WL_GET(x) (((uint32_t)(x) & MCAN_ILS_RF0WL_MASK) >> MCAN_ILS_RF0WL_SHIFT)
  1615. /*
  1616. * RF0NL (RW)
  1617. *
  1618. * Rx FIFO 0 New Message Interrupt Line
  1619. */
  1620. #define MCAN_ILS_RF0NL_MASK (0x1U)
  1621. #define MCAN_ILS_RF0NL_SHIFT (0U)
  1622. #define MCAN_ILS_RF0NL_SET(x) (((uint32_t)(x) << MCAN_ILS_RF0NL_SHIFT) & MCAN_ILS_RF0NL_MASK)
  1623. #define MCAN_ILS_RF0NL_GET(x) (((uint32_t)(x) & MCAN_ILS_RF0NL_MASK) >> MCAN_ILS_RF0NL_SHIFT)
  1624. /* Bitfield definition for register: ILE */
  1625. /*
  1626. * EINT1 (RW)
  1627. *
  1628. * Enable Interrupt Line 1
  1629. * 0= Interrupt line m_can_int1 disabled
  1630. * 1= Interrupt line m_can_int1 enabled
  1631. */
  1632. #define MCAN_ILE_EINT1_MASK (0x2U)
  1633. #define MCAN_ILE_EINT1_SHIFT (1U)
  1634. #define MCAN_ILE_EINT1_SET(x) (((uint32_t)(x) << MCAN_ILE_EINT1_SHIFT) & MCAN_ILE_EINT1_MASK)
  1635. #define MCAN_ILE_EINT1_GET(x) (((uint32_t)(x) & MCAN_ILE_EINT1_MASK) >> MCAN_ILE_EINT1_SHIFT)
  1636. /*
  1637. * EINT0 (RW)
  1638. *
  1639. * Enable Interrupt Line 0
  1640. * 0= Interrupt line m_can_int0 disabled
  1641. * 1= Interrupt line m_can_int0 enabled
  1642. */
  1643. #define MCAN_ILE_EINT0_MASK (0x1U)
  1644. #define MCAN_ILE_EINT0_SHIFT (0U)
  1645. #define MCAN_ILE_EINT0_SET(x) (((uint32_t)(x) << MCAN_ILE_EINT0_SHIFT) & MCAN_ILE_EINT0_MASK)
  1646. #define MCAN_ILE_EINT0_GET(x) (((uint32_t)(x) & MCAN_ILE_EINT0_MASK) >> MCAN_ILE_EINT0_SHIFT)
  1647. /* Bitfield definition for register: GFC */
  1648. /*
  1649. * ANFS (RW)
  1650. *
  1651. * Accept Non-matching Frames Standard
  1652. * Defines how received messages with 11-bit IDs that do not match any element of the filter list are treated.
  1653. * 00= Accept in Rx FIFO 0
  1654. * 01= Accept in Rx FIFO 1
  1655. * 10= Reject
  1656. * 11= Reject
  1657. */
  1658. #define MCAN_GFC_ANFS_MASK (0x30U)
  1659. #define MCAN_GFC_ANFS_SHIFT (4U)
  1660. #define MCAN_GFC_ANFS_SET(x) (((uint32_t)(x) << MCAN_GFC_ANFS_SHIFT) & MCAN_GFC_ANFS_MASK)
  1661. #define MCAN_GFC_ANFS_GET(x) (((uint32_t)(x) & MCAN_GFC_ANFS_MASK) >> MCAN_GFC_ANFS_SHIFT)
  1662. /*
  1663. * ANFE (RW)
  1664. *
  1665. * Accept Non-matching Frames Extended
  1666. * Defines how received messages with 29-bit IDs that do not match any element of the filter list are treated.
  1667. * 00= Accept in Rx FIFO 0
  1668. * 01= Accept in Rx FIFO 1
  1669. * 10= Reject
  1670. * 11= Reject
  1671. */
  1672. #define MCAN_GFC_ANFE_MASK (0xCU)
  1673. #define MCAN_GFC_ANFE_SHIFT (2U)
  1674. #define MCAN_GFC_ANFE_SET(x) (((uint32_t)(x) << MCAN_GFC_ANFE_SHIFT) & MCAN_GFC_ANFE_MASK)
  1675. #define MCAN_GFC_ANFE_GET(x) (((uint32_t)(x) & MCAN_GFC_ANFE_MASK) >> MCAN_GFC_ANFE_SHIFT)
  1676. /*
  1677. * RRFS (RW)
  1678. *
  1679. * Reject Remote Frames Standard
  1680. * 0= Filter remote frames with 11-bit standard IDs
  1681. * 1= Reject all remote frames with 11-bit standard IDs
  1682. */
  1683. #define MCAN_GFC_RRFS_MASK (0x2U)
  1684. #define MCAN_GFC_RRFS_SHIFT (1U)
  1685. #define MCAN_GFC_RRFS_SET(x) (((uint32_t)(x) << MCAN_GFC_RRFS_SHIFT) & MCAN_GFC_RRFS_MASK)
  1686. #define MCAN_GFC_RRFS_GET(x) (((uint32_t)(x) & MCAN_GFC_RRFS_MASK) >> MCAN_GFC_RRFS_SHIFT)
  1687. /*
  1688. * RRFE (RW)
  1689. *
  1690. * Reject Remote Frames Extended
  1691. * 0= Filter remote frames with 29-bit extended IDs
  1692. * 1= Reject all remote frames with 29-bit extended IDs
  1693. */
  1694. #define MCAN_GFC_RRFE_MASK (0x1U)
  1695. #define MCAN_GFC_RRFE_SHIFT (0U)
  1696. #define MCAN_GFC_RRFE_SET(x) (((uint32_t)(x) << MCAN_GFC_RRFE_SHIFT) & MCAN_GFC_RRFE_MASK)
  1697. #define MCAN_GFC_RRFE_GET(x) (((uint32_t)(x) & MCAN_GFC_RRFE_MASK) >> MCAN_GFC_RRFE_SHIFT)
  1698. /* Bitfield definition for register: SIDFC */
  1699. /*
  1700. * LSS (RW)
  1701. *
  1702. * List Size Standard
  1703. * 0= No standard Message ID filter
  1704. * 1-128= Number of standard Message ID filter elements
  1705. * >128= Values greater than 128 are interpreted as 128
  1706. */
  1707. #define MCAN_SIDFC_LSS_MASK (0xFF0000UL)
  1708. #define MCAN_SIDFC_LSS_SHIFT (16U)
  1709. #define MCAN_SIDFC_LSS_SET(x) (((uint32_t)(x) << MCAN_SIDFC_LSS_SHIFT) & MCAN_SIDFC_LSS_MASK)
  1710. #define MCAN_SIDFC_LSS_GET(x) (((uint32_t)(x) & MCAN_SIDFC_LSS_MASK) >> MCAN_SIDFC_LSS_SHIFT)
  1711. /*
  1712. * FLSSA (RW)
  1713. *
  1714. * Filter List Standard Start Address
  1715. * Start address of standard Message ID filter list (32-bit word address)
  1716. */
  1717. #define MCAN_SIDFC_FLSSA_MASK (0xFFFCU)
  1718. #define MCAN_SIDFC_FLSSA_SHIFT (2U)
  1719. #define MCAN_SIDFC_FLSSA_SET(x) (((uint32_t)(x) << MCAN_SIDFC_FLSSA_SHIFT) & MCAN_SIDFC_FLSSA_MASK)
  1720. #define MCAN_SIDFC_FLSSA_GET(x) (((uint32_t)(x) & MCAN_SIDFC_FLSSA_MASK) >> MCAN_SIDFC_FLSSA_SHIFT)
  1721. /* Bitfield definition for register: XIDFC */
  1722. /*
  1723. * LSE (RW)
  1724. *
  1725. * List Size Extended
  1726. * 0= No extended Message ID filter
  1727. * 1-64= Number of extended Message ID filter elements
  1728. * >64= Values greater than 64 are interpreted as 64
  1729. */
  1730. #define MCAN_XIDFC_LSE_MASK (0x7F0000UL)
  1731. #define MCAN_XIDFC_LSE_SHIFT (16U)
  1732. #define MCAN_XIDFC_LSE_SET(x) (((uint32_t)(x) << MCAN_XIDFC_LSE_SHIFT) & MCAN_XIDFC_LSE_MASK)
  1733. #define MCAN_XIDFC_LSE_GET(x) (((uint32_t)(x) & MCAN_XIDFC_LSE_MASK) >> MCAN_XIDFC_LSE_SHIFT)
  1734. /*
  1735. * FLESA (RW)
  1736. *
  1737. * Filter List Extended Start Address
  1738. * Start address of extended Message ID filter list (32-bit word address).
  1739. */
  1740. #define MCAN_XIDFC_FLESA_MASK (0xFFFCU)
  1741. #define MCAN_XIDFC_FLESA_SHIFT (2U)
  1742. #define MCAN_XIDFC_FLESA_SET(x) (((uint32_t)(x) << MCAN_XIDFC_FLESA_SHIFT) & MCAN_XIDFC_FLESA_MASK)
  1743. #define MCAN_XIDFC_FLESA_GET(x) (((uint32_t)(x) & MCAN_XIDFC_FLESA_MASK) >> MCAN_XIDFC_FLESA_SHIFT)
  1744. /* Bitfield definition for register: XIDAM */
  1745. /*
  1746. * EIDM (RW)
  1747. *
  1748. * Extended ID Mask
  1749. * For acceptance filtering of extended frames the Extended ID AND Mask is ANDed with the Message ID of a received frame. Intended for masking of 29-bit IDs in SAE J1939. With the reset value of all bits set to one the mask is not active.
  1750. */
  1751. #define MCAN_XIDAM_EIDM_MASK (0x1FFFFFFFUL)
  1752. #define MCAN_XIDAM_EIDM_SHIFT (0U)
  1753. #define MCAN_XIDAM_EIDM_SET(x) (((uint32_t)(x) << MCAN_XIDAM_EIDM_SHIFT) & MCAN_XIDAM_EIDM_MASK)
  1754. #define MCAN_XIDAM_EIDM_GET(x) (((uint32_t)(x) & MCAN_XIDAM_EIDM_MASK) >> MCAN_XIDAM_EIDM_SHIFT)
  1755. /* Bitfield definition for register: HPMS */
  1756. /*
  1757. * FLST (R)
  1758. *
  1759. * Filter List
  1760. * Indicates the filter list of the matching filter element.
  1761. * 0= Standard Filter List
  1762. * 1= Extended Filter List
  1763. */
  1764. #define MCAN_HPMS_FLST_MASK (0x8000U)
  1765. #define MCAN_HPMS_FLST_SHIFT (15U)
  1766. #define MCAN_HPMS_FLST_GET(x) (((uint32_t)(x) & MCAN_HPMS_FLST_MASK) >> MCAN_HPMS_FLST_SHIFT)
  1767. /*
  1768. * FIDX (R)
  1769. *
  1770. * Filter Index
  1771. * Index of matching filter element. Range is 0 to SIDFC.LSS - 1 resp. XIDFC.LSE - 1.
  1772. */
  1773. #define MCAN_HPMS_FIDX_MASK (0x7F00U)
  1774. #define MCAN_HPMS_FIDX_SHIFT (8U)
  1775. #define MCAN_HPMS_FIDX_GET(x) (((uint32_t)(x) & MCAN_HPMS_FIDX_MASK) >> MCAN_HPMS_FIDX_SHIFT)
  1776. /*
  1777. * MSI (R)
  1778. *
  1779. * Message Storage Indicator
  1780. * 00= No FIFO selected
  1781. * 01= FIFO message lost
  1782. * 10= Message stored in FIFO 0
  1783. * 11= Message stored in FIFO 1
  1784. */
  1785. #define MCAN_HPMS_MSI_MASK (0xC0U)
  1786. #define MCAN_HPMS_MSI_SHIFT (6U)
  1787. #define MCAN_HPMS_MSI_GET(x) (((uint32_t)(x) & MCAN_HPMS_MSI_MASK) >> MCAN_HPMS_MSI_SHIFT)
  1788. /*
  1789. * BIDX (R)
  1790. *
  1791. * Buffer Index
  1792. * Index of Rx FIFO element to which the message was stored. Only valid when MSI[1] = ‘1’.
  1793. */
  1794. #define MCAN_HPMS_BIDX_MASK (0x3FU)
  1795. #define MCAN_HPMS_BIDX_SHIFT (0U)
  1796. #define MCAN_HPMS_BIDX_GET(x) (((uint32_t)(x) & MCAN_HPMS_BIDX_MASK) >> MCAN_HPMS_BIDX_SHIFT)
  1797. /* Bitfield definition for register: NDAT1 */
  1798. /*
  1799. * ND1 (RW)
  1800. *
  1801. * New Data[31:0]
  1802. * The register holds the New Data flags of Rx Buffers 0 to 31. The flags are set when the respective Rx Buffer has been updated from a received frame. The flags remain set until the Host clears them.A flag is cleared by writing a ’1’ to the corresponding bit position. Writing a ’0’ has no effect. A hard reset will clear the register.
  1803. * 0= Rx Buffer not updated
  1804. * 1= Rx Buffer updated from new message
  1805. */
  1806. #define MCAN_NDAT1_ND1_MASK (0xFFFFFFFFUL)
  1807. #define MCAN_NDAT1_ND1_SHIFT (0U)
  1808. #define MCAN_NDAT1_ND1_SET(x) (((uint32_t)(x) << MCAN_NDAT1_ND1_SHIFT) & MCAN_NDAT1_ND1_MASK)
  1809. #define MCAN_NDAT1_ND1_GET(x) (((uint32_t)(x) & MCAN_NDAT1_ND1_MASK) >> MCAN_NDAT1_ND1_SHIFT)
  1810. /* Bitfield definition for register: NDAT2 */
  1811. /*
  1812. * ND2 (RW)
  1813. *
  1814. * New Data[63:32]
  1815. * The register holds the New Data flags of Rx Buffers 32 to 63. The flags are set when the respective Rx Buffer has been updated from a received frame. The flags remain set until the Host clears them. A flag is cleared by writing a ’1’ to the corresponding bit position. Writing a ’0’ has no effect. A hard reset will clear the register.
  1816. * 0= Rx Buffer not updated
  1817. * 1= Rx Buffer updated from new message
  1818. */
  1819. #define MCAN_NDAT2_ND2_MASK (0xFFFFFFFFUL)
  1820. #define MCAN_NDAT2_ND2_SHIFT (0U)
  1821. #define MCAN_NDAT2_ND2_SET(x) (((uint32_t)(x) << MCAN_NDAT2_ND2_SHIFT) & MCAN_NDAT2_ND2_MASK)
  1822. #define MCAN_NDAT2_ND2_GET(x) (((uint32_t)(x) & MCAN_NDAT2_ND2_MASK) >> MCAN_NDAT2_ND2_SHIFT)
  1823. /* Bitfield definition for register: RXF0C */
  1824. /*
  1825. * F0OM (RW)
  1826. *
  1827. * FIFO 0 Operation Mode
  1828. * FIFO 0 can be operated in blocking or in overwrite mode (see Section 3.4.2).
  1829. * 0= FIFO 0 blocking mode
  1830. * 1= FIFO 0 overwrite mode
  1831. */
  1832. #define MCAN_RXF0C_F0OM_MASK (0x80000000UL)
  1833. #define MCAN_RXF0C_F0OM_SHIFT (31U)
  1834. #define MCAN_RXF0C_F0OM_SET(x) (((uint32_t)(x) << MCAN_RXF0C_F0OM_SHIFT) & MCAN_RXF0C_F0OM_MASK)
  1835. #define MCAN_RXF0C_F0OM_GET(x) (((uint32_t)(x) & MCAN_RXF0C_F0OM_MASK) >> MCAN_RXF0C_F0OM_SHIFT)
  1836. /*
  1837. * F0WM (RW)
  1838. *
  1839. * Rx FIFO 0 Watermark
  1840. * 0= Watermark interrupt disabled
  1841. * 1-64= Level for Rx FIFO 0 watermark interrupt (IR.RF0W)
  1842. * >64= Watermark interrupt disabled
  1843. */
  1844. #define MCAN_RXF0C_F0WM_MASK (0x7F000000UL)
  1845. #define MCAN_RXF0C_F0WM_SHIFT (24U)
  1846. #define MCAN_RXF0C_F0WM_SET(x) (((uint32_t)(x) << MCAN_RXF0C_F0WM_SHIFT) & MCAN_RXF0C_F0WM_MASK)
  1847. #define MCAN_RXF0C_F0WM_GET(x) (((uint32_t)(x) & MCAN_RXF0C_F0WM_MASK) >> MCAN_RXF0C_F0WM_SHIFT)
  1848. /*
  1849. * F0S (RW)
  1850. *
  1851. * Rx FIFO 0 Size
  1852. * 0= No Rx FIFO 0
  1853. * 1-64= Number of Rx FIFO 0 elements
  1854. * >64= Values greater than 64 are interpreted as 64
  1855. * The Rx FIFO 0 elements are indexed from 0 to F0S-1
  1856. */
  1857. #define MCAN_RXF0C_F0S_MASK (0x7F0000UL)
  1858. #define MCAN_RXF0C_F0S_SHIFT (16U)
  1859. #define MCAN_RXF0C_F0S_SET(x) (((uint32_t)(x) << MCAN_RXF0C_F0S_SHIFT) & MCAN_RXF0C_F0S_MASK)
  1860. #define MCAN_RXF0C_F0S_GET(x) (((uint32_t)(x) & MCAN_RXF0C_F0S_MASK) >> MCAN_RXF0C_F0S_SHIFT)
  1861. /*
  1862. * F0SA (RW)
  1863. *
  1864. * Rx FIFO 0 Start Address
  1865. * Start address of Rx FIFO 0 in Message RAM (32-bit word address)
  1866. */
  1867. #define MCAN_RXF0C_F0SA_MASK (0xFFFCU)
  1868. #define MCAN_RXF0C_F0SA_SHIFT (2U)
  1869. #define MCAN_RXF0C_F0SA_SET(x) (((uint32_t)(x) << MCAN_RXF0C_F0SA_SHIFT) & MCAN_RXF0C_F0SA_MASK)
  1870. #define MCAN_RXF0C_F0SA_GET(x) (((uint32_t)(x) & MCAN_RXF0C_F0SA_MASK) >> MCAN_RXF0C_F0SA_SHIFT)
  1871. /* Bitfield definition for register: RXF0S */
  1872. /*
  1873. * RF0L (R)
  1874. *
  1875. * Rx FIFO 0 Message Lost
  1876. * This bit is a copy of interrupt flag IR.RF0L. When IR.RF0L is reset, this bit is also reset.
  1877. * 0= No Rx FIFO 0 message lost
  1878. * 1= Rx FIFO 0 message lost, also set after write attempt to Rx FIFO 0 of size zero
  1879. * Note: Overwriting the oldest message when RXF0C.F0OM = ‘1’ will not set this flag.
  1880. */
  1881. #define MCAN_RXF0S_RF0L_MASK (0x2000000UL)
  1882. #define MCAN_RXF0S_RF0L_SHIFT (25U)
  1883. #define MCAN_RXF0S_RF0L_GET(x) (((uint32_t)(x) & MCAN_RXF0S_RF0L_MASK) >> MCAN_RXF0S_RF0L_SHIFT)
  1884. /*
  1885. * F0F (R)
  1886. *
  1887. * Rx FIFO 0 Full
  1888. * 0= Rx FIFO 0 not full
  1889. * 1= Rx FIFO 0 full
  1890. */
  1891. #define MCAN_RXF0S_F0F_MASK (0x1000000UL)
  1892. #define MCAN_RXF0S_F0F_SHIFT (24U)
  1893. #define MCAN_RXF0S_F0F_GET(x) (((uint32_t)(x) & MCAN_RXF0S_F0F_MASK) >> MCAN_RXF0S_F0F_SHIFT)
  1894. /*
  1895. * F0PI (R)
  1896. *
  1897. * Rx FIFO 0 Put Index
  1898. * Rx FIFO 0 write index pointer, range 0 to 63.
  1899. */
  1900. #define MCAN_RXF0S_F0PI_MASK (0x3F0000UL)
  1901. #define MCAN_RXF0S_F0PI_SHIFT (16U)
  1902. #define MCAN_RXF0S_F0PI_GET(x) (((uint32_t)(x) & MCAN_RXF0S_F0PI_MASK) >> MCAN_RXF0S_F0PI_SHIFT)
  1903. /*
  1904. * F0GI (R)
  1905. *
  1906. * Rx FIFO 0 Get Index
  1907. * Rx FIFO 0 read index pointer, range 0 to 63.
  1908. */
  1909. #define MCAN_RXF0S_F0GI_MASK (0x3F00U)
  1910. #define MCAN_RXF0S_F0GI_SHIFT (8U)
  1911. #define MCAN_RXF0S_F0GI_GET(x) (((uint32_t)(x) & MCAN_RXF0S_F0GI_MASK) >> MCAN_RXF0S_F0GI_SHIFT)
  1912. /*
  1913. * F0FL (R)
  1914. *
  1915. * Rx FIFO 0 Fill Level
  1916. * Number of elements stored in Rx FIFO 0, range 0 to 64.
  1917. */
  1918. #define MCAN_RXF0S_F0FL_MASK (0x7FU)
  1919. #define MCAN_RXF0S_F0FL_SHIFT (0U)
  1920. #define MCAN_RXF0S_F0FL_GET(x) (((uint32_t)(x) & MCAN_RXF0S_F0FL_MASK) >> MCAN_RXF0S_F0FL_SHIFT)
  1921. /* Bitfield definition for register: RXF0A */
  1922. /*
  1923. * F0AI (RW)
  1924. *
  1925. * Rx FIFO 0 Acknowledge Index
  1926. * After the Host has read a message or a sequence of messages from Rx FIFO 0 it has to write the buffer index of the last element read from Rx FIFO 0 to F0AI. This will set the Rx FIFO 0 Get Index RXF0S.F0GI to F0AI + 1 and update the FIFO 0 Fill Level RXF0S.F0FL.
  1927. */
  1928. #define MCAN_RXF0A_F0AI_MASK (0x3FU)
  1929. #define MCAN_RXF0A_F0AI_SHIFT (0U)
  1930. #define MCAN_RXF0A_F0AI_SET(x) (((uint32_t)(x) << MCAN_RXF0A_F0AI_SHIFT) & MCAN_RXF0A_F0AI_MASK)
  1931. #define MCAN_RXF0A_F0AI_GET(x) (((uint32_t)(x) & MCAN_RXF0A_F0AI_MASK) >> MCAN_RXF0A_F0AI_SHIFT)
  1932. /* Bitfield definition for register: RXBC */
  1933. /*
  1934. * RBSA (RW)
  1935. *
  1936. * Rx Buffer Start Address
  1937. * Configures the start address of the Rx Buffers section in the Message RAM (32-bit word address).Also used to reference debug messages A,B,C.
  1938. */
  1939. #define MCAN_RXBC_RBSA_MASK (0xFFFCU)
  1940. #define MCAN_RXBC_RBSA_SHIFT (2U)
  1941. #define MCAN_RXBC_RBSA_SET(x) (((uint32_t)(x) << MCAN_RXBC_RBSA_SHIFT) & MCAN_RXBC_RBSA_MASK)
  1942. #define MCAN_RXBC_RBSA_GET(x) (((uint32_t)(x) & MCAN_RXBC_RBSA_MASK) >> MCAN_RXBC_RBSA_SHIFT)
  1943. /* Bitfield definition for register: RXF1C */
  1944. /*
  1945. * F1OM (RW)
  1946. *
  1947. * FIFO 1 Operation Mode
  1948. * FIFO 1 can be operated in blocking or in overwrite mode (see Section 3.4.2).
  1949. * 0= FIFO 1 blocking mode
  1950. * 1= FIFO 1 overwrite mode
  1951. */
  1952. #define MCAN_RXF1C_F1OM_MASK (0x80000000UL)
  1953. #define MCAN_RXF1C_F1OM_SHIFT (31U)
  1954. #define MCAN_RXF1C_F1OM_SET(x) (((uint32_t)(x) << MCAN_RXF1C_F1OM_SHIFT) & MCAN_RXF1C_F1OM_MASK)
  1955. #define MCAN_RXF1C_F1OM_GET(x) (((uint32_t)(x) & MCAN_RXF1C_F1OM_MASK) >> MCAN_RXF1C_F1OM_SHIFT)
  1956. /*
  1957. * F1WM (RW)
  1958. *
  1959. * Rx FIFO 1 Watermark
  1960. * 0= Watermark interrupt disabled
  1961. * 1-64= Level for Rx FIFO 1 watermark interrupt (IR.RF1W)
  1962. * >64= Watermark interrupt disabled
  1963. */
  1964. #define MCAN_RXF1C_F1WM_MASK (0x7F000000UL)
  1965. #define MCAN_RXF1C_F1WM_SHIFT (24U)
  1966. #define MCAN_RXF1C_F1WM_SET(x) (((uint32_t)(x) << MCAN_RXF1C_F1WM_SHIFT) & MCAN_RXF1C_F1WM_MASK)
  1967. #define MCAN_RXF1C_F1WM_GET(x) (((uint32_t)(x) & MCAN_RXF1C_F1WM_MASK) >> MCAN_RXF1C_F1WM_SHIFT)
  1968. /*
  1969. * F1S (RW)
  1970. *
  1971. * Rx FIFO 1 Size
  1972. * 0= No Rx FIFO 1
  1973. * 1-64= Number of Rx FIFO 1 elements
  1974. * >64= Values greater than 64 are interpreted as 64
  1975. * The Rx FIFO 1 elements are indexed from 0 to F1S - 1
  1976. */
  1977. #define MCAN_RXF1C_F1S_MASK (0x7F0000UL)
  1978. #define MCAN_RXF1C_F1S_SHIFT (16U)
  1979. #define MCAN_RXF1C_F1S_SET(x) (((uint32_t)(x) << MCAN_RXF1C_F1S_SHIFT) & MCAN_RXF1C_F1S_MASK)
  1980. #define MCAN_RXF1C_F1S_GET(x) (((uint32_t)(x) & MCAN_RXF1C_F1S_MASK) >> MCAN_RXF1C_F1S_SHIFT)
  1981. /*
  1982. * F1SA (RW)
  1983. *
  1984. * Rx FIFO 1 Start Address
  1985. * Start address of Rx FIFO 1 in Message RAM (32-bit word address)
  1986. */
  1987. #define MCAN_RXF1C_F1SA_MASK (0xFFFCU)
  1988. #define MCAN_RXF1C_F1SA_SHIFT (2U)
  1989. #define MCAN_RXF1C_F1SA_SET(x) (((uint32_t)(x) << MCAN_RXF1C_F1SA_SHIFT) & MCAN_RXF1C_F1SA_MASK)
  1990. #define MCAN_RXF1C_F1SA_GET(x) (((uint32_t)(x) & MCAN_RXF1C_F1SA_MASK) >> MCAN_RXF1C_F1SA_SHIFT)
  1991. /* Bitfield definition for register: RXF1S */
  1992. /*
  1993. * DMS (R)
  1994. *
  1995. * Debug Message Status
  1996. * 00= Idle state, wait for reception of debug messages, DMA request is cleared
  1997. * 01= Debug message A received
  1998. * 10= Debug messages A, B received
  1999. * 11= Debug messages A, B, C received, DMA request is set
  2000. */
  2001. #define MCAN_RXF1S_DMS_MASK (0xC0000000UL)
  2002. #define MCAN_RXF1S_DMS_SHIFT (30U)
  2003. #define MCAN_RXF1S_DMS_GET(x) (((uint32_t)(x) & MCAN_RXF1S_DMS_MASK) >> MCAN_RXF1S_DMS_SHIFT)
  2004. /*
  2005. * RF1L (R)
  2006. *
  2007. * Rx FIFO 1 Message Lost
  2008. * This bit is a copy of interrupt flag IR.RF1L. When IR.RF1L is reset, this bit is also reset.
  2009. * 0= No Rx FIFO 1 message lost
  2010. * 1= Rx FIFO 1 message lost, also set after write attempt to Rx FIFO 1 of size zero
  2011. * Note: Overwriting the oldest message when RXF1C.F1OM = ‘1’ will not set this flag.
  2012. */
  2013. #define MCAN_RXF1S_RF1L_MASK (0x2000000UL)
  2014. #define MCAN_RXF1S_RF1L_SHIFT (25U)
  2015. #define MCAN_RXF1S_RF1L_GET(x) (((uint32_t)(x) & MCAN_RXF1S_RF1L_MASK) >> MCAN_RXF1S_RF1L_SHIFT)
  2016. /*
  2017. * F1F (R)
  2018. *
  2019. * Rx FIFO 1 Full
  2020. * 0= Rx FIFO 1 not full
  2021. * 1= Rx FIFO 1 full
  2022. */
  2023. #define MCAN_RXF1S_F1F_MASK (0x1000000UL)
  2024. #define MCAN_RXF1S_F1F_SHIFT (24U)
  2025. #define MCAN_RXF1S_F1F_GET(x) (((uint32_t)(x) & MCAN_RXF1S_F1F_MASK) >> MCAN_RXF1S_F1F_SHIFT)
  2026. /*
  2027. * F1PI (R)
  2028. *
  2029. * Rx FIFO 1 Put Index
  2030. * Rx FIFO 1 write index pointer, range 0 to 63.
  2031. */
  2032. #define MCAN_RXF1S_F1PI_MASK (0x3F0000UL)
  2033. #define MCAN_RXF1S_F1PI_SHIFT (16U)
  2034. #define MCAN_RXF1S_F1PI_GET(x) (((uint32_t)(x) & MCAN_RXF1S_F1PI_MASK) >> MCAN_RXF1S_F1PI_SHIFT)
  2035. /*
  2036. * F1GI (R)
  2037. *
  2038. * Rx FIFO 1 Get Index
  2039. * Rx FIFO 1 read index pointer, range 0 to 63.
  2040. */
  2041. #define MCAN_RXF1S_F1GI_MASK (0x3F00U)
  2042. #define MCAN_RXF1S_F1GI_SHIFT (8U)
  2043. #define MCAN_RXF1S_F1GI_GET(x) (((uint32_t)(x) & MCAN_RXF1S_F1GI_MASK) >> MCAN_RXF1S_F1GI_SHIFT)
  2044. /*
  2045. * F1FL (R)
  2046. *
  2047. * Rx FIFO 1 Fill Level
  2048. * Number of elements stored in Rx FIFO 1, range 0 to 64.
  2049. */
  2050. #define MCAN_RXF1S_F1FL_MASK (0x7FU)
  2051. #define MCAN_RXF1S_F1FL_SHIFT (0U)
  2052. #define MCAN_RXF1S_F1FL_GET(x) (((uint32_t)(x) & MCAN_RXF1S_F1FL_MASK) >> MCAN_RXF1S_F1FL_SHIFT)
  2053. /* Bitfield definition for register: RXF1A */
  2054. /*
  2055. * F1AI (RW)
  2056. *
  2057. * Rx FIFO 1 Acknowledge Index
  2058. * After the Host has read a message or a sequence of messages from Rx FIFO 1 it has to write the buffer index of the last element read from Rx FIFO 1 to F1AI. This will set the Rx FIFO 1 Get Index RXF1S.F1GI to F1AI + 1 and update the FIFO 1 Fill Level RXF1S.F1FL.
  2059. */
  2060. #define MCAN_RXF1A_F1AI_MASK (0x3FU)
  2061. #define MCAN_RXF1A_F1AI_SHIFT (0U)
  2062. #define MCAN_RXF1A_F1AI_SET(x) (((uint32_t)(x) << MCAN_RXF1A_F1AI_SHIFT) & MCAN_RXF1A_F1AI_MASK)
  2063. #define MCAN_RXF1A_F1AI_GET(x) (((uint32_t)(x) & MCAN_RXF1A_F1AI_MASK) >> MCAN_RXF1A_F1AI_SHIFT)
  2064. /* Bitfield definition for register: RXESC */
  2065. /*
  2066. * RBDS (RW)
  2067. *
  2068. * Rx Buffer Data Field Size
  2069. * 000= 8 byte data field
  2070. * 001= 12 byte data field
  2071. * 010= 16 byte data field
  2072. * 011= 20 byte data field
  2073. * 100= 24 byte data field
  2074. * 101= 32 byte data field
  2075. * 110= 48 byte data field
  2076. * 111= 64 byte data field
  2077. */
  2078. #define MCAN_RXESC_RBDS_MASK (0x700U)
  2079. #define MCAN_RXESC_RBDS_SHIFT (8U)
  2080. #define MCAN_RXESC_RBDS_SET(x) (((uint32_t)(x) << MCAN_RXESC_RBDS_SHIFT) & MCAN_RXESC_RBDS_MASK)
  2081. #define MCAN_RXESC_RBDS_GET(x) (((uint32_t)(x) & MCAN_RXESC_RBDS_MASK) >> MCAN_RXESC_RBDS_SHIFT)
  2082. /*
  2083. * F1DS (RW)
  2084. *
  2085. * Rx FIFO 1 Data Field Size
  2086. * 000= 8 byte data field
  2087. * 001= 12 byte data field
  2088. * 010= 16 byte data field
  2089. * 011= 20 byte data field
  2090. * 100= 24 byte data field
  2091. * 101= 32 byte data field
  2092. * 110= 48 byte data field
  2093. * 111= 64 byte data field
  2094. */
  2095. #define MCAN_RXESC_F1DS_MASK (0x70U)
  2096. #define MCAN_RXESC_F1DS_SHIFT (4U)
  2097. #define MCAN_RXESC_F1DS_SET(x) (((uint32_t)(x) << MCAN_RXESC_F1DS_SHIFT) & MCAN_RXESC_F1DS_MASK)
  2098. #define MCAN_RXESC_F1DS_GET(x) (((uint32_t)(x) & MCAN_RXESC_F1DS_MASK) >> MCAN_RXESC_F1DS_SHIFT)
  2099. /*
  2100. * F0DS (RW)
  2101. *
  2102. * Rx FIFO 0 Data Field Size
  2103. * 000= 8 byte data field
  2104. * 001= 12 byte data field
  2105. * 010= 16 byte data field
  2106. * 011= 20 byte data field
  2107. * 100= 24 byte data field
  2108. * 101= 32 byte data field
  2109. * 110= 48 byte data field
  2110. * 111= 64 byte data field
  2111. * Note: In case the data field size of an accepted CAN frame exceeds the data field size configured for the matching Rx Buffer or Rx FIFO, only the number of bytes as configured by RXESC are stored to the Rx Buffer resp. Rx FIFO element. The rest of the frame’s data field is ignored.
  2112. */
  2113. #define MCAN_RXESC_F0DS_MASK (0x7U)
  2114. #define MCAN_RXESC_F0DS_SHIFT (0U)
  2115. #define MCAN_RXESC_F0DS_SET(x) (((uint32_t)(x) << MCAN_RXESC_F0DS_SHIFT) & MCAN_RXESC_F0DS_MASK)
  2116. #define MCAN_RXESC_F0DS_GET(x) (((uint32_t)(x) & MCAN_RXESC_F0DS_MASK) >> MCAN_RXESC_F0DS_SHIFT)
  2117. /* Bitfield definition for register: TXBC */
  2118. /*
  2119. * TFQM (RW)
  2120. *
  2121. * Tx FIFO/Queue Mode
  2122. * 0= Tx FIFO operation
  2123. * 1= Tx Queue operation
  2124. */
  2125. #define MCAN_TXBC_TFQM_MASK (0x40000000UL)
  2126. #define MCAN_TXBC_TFQM_SHIFT (30U)
  2127. #define MCAN_TXBC_TFQM_SET(x) (((uint32_t)(x) << MCAN_TXBC_TFQM_SHIFT) & MCAN_TXBC_TFQM_MASK)
  2128. #define MCAN_TXBC_TFQM_GET(x) (((uint32_t)(x) & MCAN_TXBC_TFQM_MASK) >> MCAN_TXBC_TFQM_SHIFT)
  2129. /*
  2130. * TFQS (RW)
  2131. *
  2132. * Transmit FIFO/Queue Size
  2133. * 0= No Tx FIFO/Queue
  2134. * 1-32= Number of Tx Buffers used for Tx FIFO/Queue
  2135. * >32= Values greater than 32 are interpreted as 32
  2136. */
  2137. #define MCAN_TXBC_TFQS_MASK (0x3F000000UL)
  2138. #define MCAN_TXBC_TFQS_SHIFT (24U)
  2139. #define MCAN_TXBC_TFQS_SET(x) (((uint32_t)(x) << MCAN_TXBC_TFQS_SHIFT) & MCAN_TXBC_TFQS_MASK)
  2140. #define MCAN_TXBC_TFQS_GET(x) (((uint32_t)(x) & MCAN_TXBC_TFQS_MASK) >> MCAN_TXBC_TFQS_SHIFT)
  2141. /*
  2142. * NDTB (RW)
  2143. *
  2144. * Number of Dedicated Transmit Buffers
  2145. * 0= No Dedicated Tx Buffers
  2146. * 1-32= Number of Dedicated Tx Buffers
  2147. * >32= Values greater than 32 are interpreted as 32
  2148. */
  2149. #define MCAN_TXBC_NDTB_MASK (0x3F0000UL)
  2150. #define MCAN_TXBC_NDTB_SHIFT (16U)
  2151. #define MCAN_TXBC_NDTB_SET(x) (((uint32_t)(x) << MCAN_TXBC_NDTB_SHIFT) & MCAN_TXBC_NDTB_MASK)
  2152. #define MCAN_TXBC_NDTB_GET(x) (((uint32_t)(x) & MCAN_TXBC_NDTB_MASK) >> MCAN_TXBC_NDTB_SHIFT)
  2153. /*
  2154. * TBSA (RW)
  2155. *
  2156. * Tx Buffers Start Address
  2157. * Start address of Tx Buffers section in Message RAM (32-bit word address, see Figure 2).
  2158. * Note: Be aware that the sum of TFQS and NDTB may be not greater than 32. There is no check for erroneous configurations. The Tx Buffers section in the Message RAM starts with the dedicated Tx Buffers.
  2159. */
  2160. #define MCAN_TXBC_TBSA_MASK (0xFFFCU)
  2161. #define MCAN_TXBC_TBSA_SHIFT (2U)
  2162. #define MCAN_TXBC_TBSA_SET(x) (((uint32_t)(x) << MCAN_TXBC_TBSA_SHIFT) & MCAN_TXBC_TBSA_MASK)
  2163. #define MCAN_TXBC_TBSA_GET(x) (((uint32_t)(x) & MCAN_TXBC_TBSA_MASK) >> MCAN_TXBC_TBSA_SHIFT)
  2164. /* Bitfield definition for register: TXFQS */
  2165. /*
  2166. * TFQF (R)
  2167. *
  2168. * Tx FIFO/Queue Full
  2169. * 0= Tx FIFO/Queue not full
  2170. * 1= Tx FIFO/Queue full
  2171. */
  2172. #define MCAN_TXFQS_TFQF_MASK (0x200000UL)
  2173. #define MCAN_TXFQS_TFQF_SHIFT (21U)
  2174. #define MCAN_TXFQS_TFQF_GET(x) (((uint32_t)(x) & MCAN_TXFQS_TFQF_MASK) >> MCAN_TXFQS_TFQF_SHIFT)
  2175. /*
  2176. * TFQPI (R)
  2177. *
  2178. * Tx FIFO/Queue Put Index
  2179. * Tx FIFO/Queue write index pointer, range 0 to 31.
  2180. */
  2181. #define MCAN_TXFQS_TFQPI_MASK (0x1F0000UL)
  2182. #define MCAN_TXFQS_TFQPI_SHIFT (16U)
  2183. #define MCAN_TXFQS_TFQPI_GET(x) (((uint32_t)(x) & MCAN_TXFQS_TFQPI_MASK) >> MCAN_TXFQS_TFQPI_SHIFT)
  2184. /*
  2185. * TFGI (R)
  2186. *
  2187. * Tx FIFO Get Index
  2188. * Tx FIFO read index pointer, range 0 to 31. Read as zero when Tx Queue operation is configured
  2189. * (TXBC.TFQM = ‘1’).
  2190. */
  2191. #define MCAN_TXFQS_TFGI_MASK (0x1F00U)
  2192. #define MCAN_TXFQS_TFGI_SHIFT (8U)
  2193. #define MCAN_TXFQS_TFGI_GET(x) (((uint32_t)(x) & MCAN_TXFQS_TFGI_MASK) >> MCAN_TXFQS_TFGI_SHIFT)
  2194. /*
  2195. * TFFL (R)
  2196. *
  2197. * Tx FIFO Free Level
  2198. * Number of consecutive free Tx FIFO elements starting from TFGI, range 0 to 32. Read as zero when Tx Queue operation is configured (TXBC.TFQM = ‘1’)
  2199. * Note: In case of mixed configurations where dedicated Tx Buffers are combined with a Tx FIFO or a Tx Queue, the Put and Get Indices indicate the number of the Tx Buffer starting with
  2200. * the first dedicated Tx Buffers.
  2201. * Example: For a configuration of 12 dedicated Tx Buffers and a Tx FIFO of 20 Buffers a Put Index of 15 points to the fourth buffer of the Tx FIFO.
  2202. */
  2203. #define MCAN_TXFQS_TFFL_MASK (0x3FU)
  2204. #define MCAN_TXFQS_TFFL_SHIFT (0U)
  2205. #define MCAN_TXFQS_TFFL_GET(x) (((uint32_t)(x) & MCAN_TXFQS_TFFL_MASK) >> MCAN_TXFQS_TFFL_SHIFT)
  2206. /* Bitfield definition for register: TXESC */
  2207. /*
  2208. * TBDS (RW)
  2209. *
  2210. * Tx Buffer Data Field Size
  2211. * 000= 8 byte data field
  2212. * 001= 12 byte data field
  2213. * 010= 16 byte data field
  2214. * 011= 20 byte data field
  2215. * 100= 24 byte data field
  2216. * 101= 32 byte data field
  2217. * 110= 48 byte data field
  2218. * 111= 64 byte data field
  2219. * Note: In case the data length code DLC of a Tx Buffer element is configured to a value higher than the Tx Buffer data field size TXESC.TBDS, the bytes not defined by the Tx Buffer are transmitted as “0xCC” (padding bytes).
  2220. */
  2221. #define MCAN_TXESC_TBDS_MASK (0x7U)
  2222. #define MCAN_TXESC_TBDS_SHIFT (0U)
  2223. #define MCAN_TXESC_TBDS_SET(x) (((uint32_t)(x) << MCAN_TXESC_TBDS_SHIFT) & MCAN_TXESC_TBDS_MASK)
  2224. #define MCAN_TXESC_TBDS_GET(x) (((uint32_t)(x) & MCAN_TXESC_TBDS_MASK) >> MCAN_TXESC_TBDS_SHIFT)
  2225. /* Bitfield definition for register: TXBRP */
  2226. /*
  2227. * TRP (R)
  2228. *
  2229. * Transmission Request Pending
  2230. * Each Tx Buffer has its own Transmission Request Pending bit. The bits are set via register TXBAR.The bits are reset after a requested transmission has completed or has been cancelled via register
  2231. * TXBCR.
  2232. * TXBRP bits are set only for those Tx Buffers configured via TXBC. After a TXBRP bit has been set, a Tx scan (see Section 3.5, Tx Handling) is started to check for the pending Tx request with the
  2233. * highest priority (Tx Buffer with lowest Message ID).
  2234. * A cancellation request resets the corresponding transmission request pending bit of register TXBRP. In case a transmission has already been started when a cancellation is requested, this is done at the end of the transmission, regardless whether the transmission was successful or not. The cancellation request bits are reset directly after the corresponding TXBRP bit has been reset.
  2235. * After a cancellation has been requested, a finished cancellation is signalled via TXBCF
  2236. * ? after successful transmission together with the corresponding TXBTO bit
  2237. * ? when the transmission has not yet been started at the point of cancellation
  2238. * ? when the transmission has been aborted due to lost arbitration
  2239. * ? when an error occurred during frame transmission
  2240. * In DAR mode all transmissions are automatically cancelled if they are not successful. The corresponding TXBCF bit is set for all unsuccessful transmissions.
  2241. * 0= No transmission request pending
  2242. * 1= Transmission request pending
  2243. * Note: TXBRP bits which are set while a Tx scan is in progress are not considered during this particular Tx scan. In case a cancellation is requested for such a Tx Buffer, this Add Request is cancelled immediately, the corresponding TXBRP bit is reset.
  2244. */
  2245. #define MCAN_TXBRP_TRP_MASK (0xFFFFFFFFUL)
  2246. #define MCAN_TXBRP_TRP_SHIFT (0U)
  2247. #define MCAN_TXBRP_TRP_GET(x) (((uint32_t)(x) & MCAN_TXBRP_TRP_MASK) >> MCAN_TXBRP_TRP_SHIFT)
  2248. /* Bitfield definition for register: TXBAR */
  2249. /*
  2250. * AR (RW)
  2251. *
  2252. * Add Request
  2253. * Each Tx Buffer has its own Add Request bit. Writing a ‘1’ will set the corresponding Add Request bit; writing a ‘0’ has no impact. This enables the Host to set transmission requests for multiple Tx
  2254. * Buffers with one write to TXBAR. TXBAR bits are set only for those Tx Buffers configured via TXBC.
  2255. * When no Tx scan is running, the bits are reset immediately, else the bits remain set until the Tx scan process has completed.
  2256. * 0= No transmission request added
  2257. * 1= Transmission requested added
  2258. * Note: If an add request is applied for a Tx Buffer with pending transmission request (corresponding TXBRP bit already set), this add request is ignored.
  2259. */
  2260. #define MCAN_TXBAR_AR_MASK (0xFFFFFFFFUL)
  2261. #define MCAN_TXBAR_AR_SHIFT (0U)
  2262. #define MCAN_TXBAR_AR_SET(x) (((uint32_t)(x) << MCAN_TXBAR_AR_SHIFT) & MCAN_TXBAR_AR_MASK)
  2263. #define MCAN_TXBAR_AR_GET(x) (((uint32_t)(x) & MCAN_TXBAR_AR_MASK) >> MCAN_TXBAR_AR_SHIFT)
  2264. /* Bitfield definition for register: TXBCR */
  2265. /*
  2266. * CR (RW)
  2267. *
  2268. * Cancellation Request
  2269. * Each Tx Buffer has its own Cancellation Request bit. Writing a ‘1’ will set the corresponding Cancellation Request bit; writing a ‘0’ has no impact. This enables the Host to set cancellation requests for multiple Tx Buffers with one write to TXBCR. TXBCR bits are set only for those Tx Buffers configured via TXBC. The bits remain set until the corresponding bit of TXBRP is reset.
  2270. * 0= No cancellation pending
  2271. * 1= Cancellation pending
  2272. */
  2273. #define MCAN_TXBCR_CR_MASK (0xFFFFFFFFUL)
  2274. #define MCAN_TXBCR_CR_SHIFT (0U)
  2275. #define MCAN_TXBCR_CR_SET(x) (((uint32_t)(x) << MCAN_TXBCR_CR_SHIFT) & MCAN_TXBCR_CR_MASK)
  2276. #define MCAN_TXBCR_CR_GET(x) (((uint32_t)(x) & MCAN_TXBCR_CR_MASK) >> MCAN_TXBCR_CR_SHIFT)
  2277. /* Bitfield definition for register: TXBTO */
  2278. /*
  2279. * TO (R)
  2280. *
  2281. * Transmission Occurred
  2282. * Each Tx Buffer has its own Transmission Occurred bit. The bits are set when the corresponding TXBRP bit is cleared after a successful transmission. The bits are reset when a new transmission is requested by writing a ‘1’ to the corresponding bit of register TXBAR.
  2283. * 0= No transmission occurred
  2284. * 1= Transmission occurred
  2285. */
  2286. #define MCAN_TXBTO_TO_MASK (0xFFFFFFFFUL)
  2287. #define MCAN_TXBTO_TO_SHIFT (0U)
  2288. #define MCAN_TXBTO_TO_GET(x) (((uint32_t)(x) & MCAN_TXBTO_TO_MASK) >> MCAN_TXBTO_TO_SHIFT)
  2289. /* Bitfield definition for register: TXBCF */
  2290. /*
  2291. * CF (R)
  2292. *
  2293. * Cancellation Finished
  2294. * Each Tx Buffer has its own Cancellation Finished bit. The bits are set when the corresponding TXBRP bit is cleared after a cancellation was requested via TXBCR. In case the corresponding TXBRP bit was not set at the point of cancellation, CF is set immediately. The bits are reset when a new transmission is requested by writing a ‘1’ to the corresponding bit of register TXBAR.
  2295. * 0= No transmit buffer cancellation
  2296. * 1= Transmit buffer cancellation finished
  2297. */
  2298. #define MCAN_TXBCF_CF_MASK (0xFFFFFFFFUL)
  2299. #define MCAN_TXBCF_CF_SHIFT (0U)
  2300. #define MCAN_TXBCF_CF_GET(x) (((uint32_t)(x) & MCAN_TXBCF_CF_MASK) >> MCAN_TXBCF_CF_SHIFT)
  2301. /* Bitfield definition for register: TXBTIE */
  2302. /*
  2303. * TIE (RW)
  2304. *
  2305. * Transmission Interrupt Enable
  2306. * Each Tx Buffer has its own Transmission Interrupt Enable bit.
  2307. * 0= Transmission interrupt disabled
  2308. * 1= Transmission interrupt enable
  2309. */
  2310. #define MCAN_TXBTIE_TIE_MASK (0xFFFFFFFFUL)
  2311. #define MCAN_TXBTIE_TIE_SHIFT (0U)
  2312. #define MCAN_TXBTIE_TIE_SET(x) (((uint32_t)(x) << MCAN_TXBTIE_TIE_SHIFT) & MCAN_TXBTIE_TIE_MASK)
  2313. #define MCAN_TXBTIE_TIE_GET(x) (((uint32_t)(x) & MCAN_TXBTIE_TIE_MASK) >> MCAN_TXBTIE_TIE_SHIFT)
  2314. /* Bitfield definition for register: TXBCIE */
  2315. /*
  2316. * CFIE (RW)
  2317. *
  2318. * Cancellation Finished Interrupt Enable
  2319. * Each Tx Buffer has its own Cancellation Finished Interrupt Enable bit.
  2320. * 0= Cancellation finished interrupt disabled
  2321. * 1= Cancellation finished interrupt enabled
  2322. */
  2323. #define MCAN_TXBCIE_CFIE_MASK (0xFFFFFFFFUL)
  2324. #define MCAN_TXBCIE_CFIE_SHIFT (0U)
  2325. #define MCAN_TXBCIE_CFIE_SET(x) (((uint32_t)(x) << MCAN_TXBCIE_CFIE_SHIFT) & MCAN_TXBCIE_CFIE_MASK)
  2326. #define MCAN_TXBCIE_CFIE_GET(x) (((uint32_t)(x) & MCAN_TXBCIE_CFIE_MASK) >> MCAN_TXBCIE_CFIE_SHIFT)
  2327. /* Bitfield definition for register: TXEFC */
  2328. /*
  2329. * EFWM (RW)
  2330. *
  2331. * Event FIFO Watermark
  2332. * 0= Watermark interrupt disabled
  2333. * 1-32= Level for Tx Event FIFO watermark interrupt (IR.TEFW)
  2334. * >32= Watermark interrupt disabled
  2335. */
  2336. #define MCAN_TXEFC_EFWM_MASK (0x3F000000UL)
  2337. #define MCAN_TXEFC_EFWM_SHIFT (24U)
  2338. #define MCAN_TXEFC_EFWM_SET(x) (((uint32_t)(x) << MCAN_TXEFC_EFWM_SHIFT) & MCAN_TXEFC_EFWM_MASK)
  2339. #define MCAN_TXEFC_EFWM_GET(x) (((uint32_t)(x) & MCAN_TXEFC_EFWM_MASK) >> MCAN_TXEFC_EFWM_SHIFT)
  2340. /*
  2341. * EFS (RW)
  2342. *
  2343. * Event FIFO Size
  2344. * 0= Tx Event FIFO disabled
  2345. * 1-32= Number of Tx Event FIFO elements
  2346. * >32= Values greater than 32 are interpreted as 32
  2347. * The Tx Event FIFO elements are indexed from 0 to EFS - 1
  2348. */
  2349. #define MCAN_TXEFC_EFS_MASK (0x3F0000UL)
  2350. #define MCAN_TXEFC_EFS_SHIFT (16U)
  2351. #define MCAN_TXEFC_EFS_SET(x) (((uint32_t)(x) << MCAN_TXEFC_EFS_SHIFT) & MCAN_TXEFC_EFS_MASK)
  2352. #define MCAN_TXEFC_EFS_GET(x) (((uint32_t)(x) & MCAN_TXEFC_EFS_MASK) >> MCAN_TXEFC_EFS_SHIFT)
  2353. /*
  2354. * EFSA (RW)
  2355. *
  2356. * Event FIFO Start Address
  2357. * Start address of Tx Event FIFO in Message RAM (32-bit word address)
  2358. */
  2359. #define MCAN_TXEFC_EFSA_MASK (0xFFFCU)
  2360. #define MCAN_TXEFC_EFSA_SHIFT (2U)
  2361. #define MCAN_TXEFC_EFSA_SET(x) (((uint32_t)(x) << MCAN_TXEFC_EFSA_SHIFT) & MCAN_TXEFC_EFSA_MASK)
  2362. #define MCAN_TXEFC_EFSA_GET(x) (((uint32_t)(x) & MCAN_TXEFC_EFSA_MASK) >> MCAN_TXEFC_EFSA_SHIFT)
  2363. /* Bitfield definition for register: TXEFS */
  2364. /*
  2365. * TEFL (R)
  2366. *
  2367. * Tx Event FIFO Element Lost
  2368. * This bit is a copy of interrupt flag IR.TEFL. When IR.TEFL is reset, this bit is also reset.
  2369. * 0= No Tx Event FIFO element lost
  2370. * 1= Tx Event FIFO element lost, also set after write attempt to Tx Event FIFO of size zero.
  2371. */
  2372. #define MCAN_TXEFS_TEFL_MASK (0x2000000UL)
  2373. #define MCAN_TXEFS_TEFL_SHIFT (25U)
  2374. #define MCAN_TXEFS_TEFL_GET(x) (((uint32_t)(x) & MCAN_TXEFS_TEFL_MASK) >> MCAN_TXEFS_TEFL_SHIFT)
  2375. /*
  2376. * EFF (R)
  2377. *
  2378. * Event FIFO Full
  2379. * 0= Tx Event FIFO not full
  2380. * 1= Tx Event FIFO full
  2381. */
  2382. #define MCAN_TXEFS_EFF_MASK (0x1000000UL)
  2383. #define MCAN_TXEFS_EFF_SHIFT (24U)
  2384. #define MCAN_TXEFS_EFF_GET(x) (((uint32_t)(x) & MCAN_TXEFS_EFF_MASK) >> MCAN_TXEFS_EFF_SHIFT)
  2385. /*
  2386. * EFPI (R)
  2387. *
  2388. * Event FIFO Put Index
  2389. * Tx Event FIFO write index pointer, range 0 to 31.
  2390. */
  2391. #define MCAN_TXEFS_EFPI_MASK (0x1F0000UL)
  2392. #define MCAN_TXEFS_EFPI_SHIFT (16U)
  2393. #define MCAN_TXEFS_EFPI_GET(x) (((uint32_t)(x) & MCAN_TXEFS_EFPI_MASK) >> MCAN_TXEFS_EFPI_SHIFT)
  2394. /*
  2395. * EFGI (R)
  2396. *
  2397. * Event FIFO Get Index
  2398. * Tx Event FIFO read index pointer, range 0 to 31.
  2399. */
  2400. #define MCAN_TXEFS_EFGI_MASK (0x1F00U)
  2401. #define MCAN_TXEFS_EFGI_SHIFT (8U)
  2402. #define MCAN_TXEFS_EFGI_GET(x) (((uint32_t)(x) & MCAN_TXEFS_EFGI_MASK) >> MCAN_TXEFS_EFGI_SHIFT)
  2403. /*
  2404. * EFFL (R)
  2405. *
  2406. * Event FIFO Fill Level
  2407. * Number of elements stored in Tx Event FIFO, range 0 to 32.
  2408. */
  2409. #define MCAN_TXEFS_EFFL_MASK (0x3FU)
  2410. #define MCAN_TXEFS_EFFL_SHIFT (0U)
  2411. #define MCAN_TXEFS_EFFL_GET(x) (((uint32_t)(x) & MCAN_TXEFS_EFFL_MASK) >> MCAN_TXEFS_EFFL_SHIFT)
  2412. /* Bitfield definition for register: TXEFA */
  2413. /*
  2414. * EFAI (RW)
  2415. *
  2416. * Event FIFO Acknowledge Index
  2417. * After the Host has read an element or a sequence of elements from the Tx Event FIFO it has to write the index of the last element read from Tx Event FIFO to EFAI. This will set the Tx Event FIFO Get
  2418. * Index TXEFS.EFGI to EFAI + 1 and update the Event FIFO Fill Level TXEFS.EFFL.
  2419. */
  2420. #define MCAN_TXEFA_EFAI_MASK (0x1FU)
  2421. #define MCAN_TXEFA_EFAI_SHIFT (0U)
  2422. #define MCAN_TXEFA_EFAI_SET(x) (((uint32_t)(x) << MCAN_TXEFA_EFAI_SHIFT) & MCAN_TXEFA_EFAI_MASK)
  2423. #define MCAN_TXEFA_EFAI_GET(x) (((uint32_t)(x) & MCAN_TXEFA_EFAI_MASK) >> MCAN_TXEFA_EFAI_SHIFT)
  2424. /* Bitfield definition for register array: TS_SEL */
  2425. /*
  2426. * TS (R)
  2427. *
  2428. * Timestamp Word TS
  2429. * default can save 16 timestamps with 32bit;
  2430. * if ts64_en is set, then work at 64bit mode, can save 8 timestamps with 01/23/45….
  2431. */
  2432. #define MCAN_TS_SEL_TS_MASK (0xFFFFFFFFUL)
  2433. #define MCAN_TS_SEL_TS_SHIFT (0U)
  2434. #define MCAN_TS_SEL_TS_GET(x) (((uint32_t)(x) & MCAN_TS_SEL_TS_MASK) >> MCAN_TS_SEL_TS_SHIFT)
  2435. /* Bitfield definition for register: CREL */
  2436. /*
  2437. * REL (R)
  2438. *
  2439. * Core Release
  2440. * One digit, BCD-coded
  2441. */
  2442. #define MCAN_CREL_REL_MASK (0xF0000000UL)
  2443. #define MCAN_CREL_REL_SHIFT (28U)
  2444. #define MCAN_CREL_REL_GET(x) (((uint32_t)(x) & MCAN_CREL_REL_MASK) >> MCAN_CREL_REL_SHIFT)
  2445. /*
  2446. * STEP (R)
  2447. *
  2448. * Step of Core Release
  2449. * One digit, BCD-coded.
  2450. */
  2451. #define MCAN_CREL_STEP_MASK (0xF000000UL)
  2452. #define MCAN_CREL_STEP_SHIFT (24U)
  2453. #define MCAN_CREL_STEP_GET(x) (((uint32_t)(x) & MCAN_CREL_STEP_MASK) >> MCAN_CREL_STEP_SHIFT)
  2454. /*
  2455. * SUBSTEP (R)
  2456. *
  2457. * Sub-step of Core Release
  2458. * One digit, BCD-coded
  2459. */
  2460. #define MCAN_CREL_SUBSTEP_MASK (0xF00000UL)
  2461. #define MCAN_CREL_SUBSTEP_SHIFT (20U)
  2462. #define MCAN_CREL_SUBSTEP_GET(x) (((uint32_t)(x) & MCAN_CREL_SUBSTEP_MASK) >> MCAN_CREL_SUBSTEP_SHIFT)
  2463. /*
  2464. * YEAR (R)
  2465. *
  2466. * Timestamp Year
  2467. * One digit, BCD-coded. This field is set by generic parameter on
  2468. * synthesis.
  2469. */
  2470. #define MCAN_CREL_YEAR_MASK (0xF0000UL)
  2471. #define MCAN_CREL_YEAR_SHIFT (16U)
  2472. #define MCAN_CREL_YEAR_GET(x) (((uint32_t)(x) & MCAN_CREL_YEAR_MASK) >> MCAN_CREL_YEAR_SHIFT)
  2473. /*
  2474. * MON (R)
  2475. *
  2476. * Timestamp Month
  2477. * Two digits, BCD-coded. This field is set by generic parameter
  2478. * on synthesis.
  2479. */
  2480. #define MCAN_CREL_MON_MASK (0xFF00U)
  2481. #define MCAN_CREL_MON_SHIFT (8U)
  2482. #define MCAN_CREL_MON_GET(x) (((uint32_t)(x) & MCAN_CREL_MON_MASK) >> MCAN_CREL_MON_SHIFT)
  2483. /*
  2484. * DAY (R)
  2485. *
  2486. * Timestamp Day
  2487. * Two digits, BCD-coded. This field is set by generic parameter
  2488. * on synthesis.
  2489. */
  2490. #define MCAN_CREL_DAY_MASK (0xFFU)
  2491. #define MCAN_CREL_DAY_SHIFT (0U)
  2492. #define MCAN_CREL_DAY_GET(x) (((uint32_t)(x) & MCAN_CREL_DAY_MASK) >> MCAN_CREL_DAY_SHIFT)
  2493. /* Bitfield definition for register: TSCFG */
  2494. /*
  2495. * TBPRE (RW)
  2496. *
  2497. * Timebase Prescaler
  2498. * 0x00 to 0xFF
  2499. * The value by which the oscillator frequency is divided for
  2500. * generating the timebase counter clock. Valid values for the
  2501. * Timebase Prescaler are 0 to 255. The actual interpretation by
  2502. * the hardware of this value is such that one more than the value
  2503. * programmed here is used. Affects only the TSU internal
  2504. * timebase. When the internal timebase is excluded by synthesis,
  2505. * TBPRE[7:0] is fixed to 0x00, the Timestamp Prescaler is not
  2506. * used.
  2507. */
  2508. #define MCAN_TSCFG_TBPRE_MASK (0xFF00U)
  2509. #define MCAN_TSCFG_TBPRE_SHIFT (8U)
  2510. #define MCAN_TSCFG_TBPRE_SET(x) (((uint32_t)(x) << MCAN_TSCFG_TBPRE_SHIFT) & MCAN_TSCFG_TBPRE_MASK)
  2511. #define MCAN_TSCFG_TBPRE_GET(x) (((uint32_t)(x) & MCAN_TSCFG_TBPRE_MASK) >> MCAN_TSCFG_TBPRE_SHIFT)
  2512. /*
  2513. * EN64 (RW)
  2514. *
  2515. * set to use 64bit timestamp.
  2516. * when enabled, tsu can save up to 8 different timestamps, TS(k) and TS(k+1) are used for one 64bit timestamp, k is 0~7.
  2517. * TSP can be used to select different one
  2518. */
  2519. #define MCAN_TSCFG_EN64_MASK (0x8U)
  2520. #define MCAN_TSCFG_EN64_SHIFT (3U)
  2521. #define MCAN_TSCFG_EN64_SET(x) (((uint32_t)(x) << MCAN_TSCFG_EN64_SHIFT) & MCAN_TSCFG_EN64_MASK)
  2522. #define MCAN_TSCFG_EN64_GET(x) (((uint32_t)(x) & MCAN_TSCFG_EN64_MASK) >> MCAN_TSCFG_EN64_SHIFT)
  2523. /*
  2524. * SCP (RW)
  2525. *
  2526. * Select Capturing Position
  2527. * 0: Capture Timestamp at EOF
  2528. * 1: Capture Timestamp at SOF
  2529. */
  2530. #define MCAN_TSCFG_SCP_MASK (0x4U)
  2531. #define MCAN_TSCFG_SCP_SHIFT (2U)
  2532. #define MCAN_TSCFG_SCP_SET(x) (((uint32_t)(x) << MCAN_TSCFG_SCP_SHIFT) & MCAN_TSCFG_SCP_MASK)
  2533. #define MCAN_TSCFG_SCP_GET(x) (((uint32_t)(x) & MCAN_TSCFG_SCP_MASK) >> MCAN_TSCFG_SCP_SHIFT)
  2534. /*
  2535. * TBCS (RW)
  2536. *
  2537. * Timebase Counter Select
  2538. * When the internal timebase is excluded by synthesis, TBCS is
  2539. * fixed to ‘1’.
  2540. * 0: Timestamp value captured from internal timebase counter,
  2541. * ATB.TB[31:0] is the internal timbase counter
  2542. * 1: Timestamp value captured from input tsu_tbin[31:0],ATB.TB[31:0] is tsu_tbin[31:0]
  2543. */
  2544. #define MCAN_TSCFG_TBCS_MASK (0x2U)
  2545. #define MCAN_TSCFG_TBCS_SHIFT (1U)
  2546. #define MCAN_TSCFG_TBCS_SET(x) (((uint32_t)(x) << MCAN_TSCFG_TBCS_SHIFT) & MCAN_TSCFG_TBCS_MASK)
  2547. #define MCAN_TSCFG_TBCS_GET(x) (((uint32_t)(x) & MCAN_TSCFG_TBCS_MASK) >> MCAN_TSCFG_TBCS_SHIFT)
  2548. /*
  2549. * TSUE (RW)
  2550. *
  2551. * Timestamp Unit Enable
  2552. * 0: TSU disabled
  2553. * 1: TSU enabled
  2554. */
  2555. #define MCAN_TSCFG_TSUE_MASK (0x1U)
  2556. #define MCAN_TSCFG_TSUE_SHIFT (0U)
  2557. #define MCAN_TSCFG_TSUE_SET(x) (((uint32_t)(x) << MCAN_TSCFG_TSUE_SHIFT) & MCAN_TSCFG_TSUE_MASK)
  2558. #define MCAN_TSCFG_TSUE_GET(x) (((uint32_t)(x) & MCAN_TSCFG_TSUE_MASK) >> MCAN_TSCFG_TSUE_SHIFT)
  2559. /* Bitfield definition for register: TSS1 */
  2560. /*
  2561. * TSL (R)
  2562. *
  2563. * Timestamp Lost
  2564. * Each Timestamp register (TS0-TS15) is assigned one bit. The bits are set when the timestamp stored in the related Timestamp register was overwritten before it was read.
  2565. * Reading a Timestamp register resets the related bit.
  2566. */
  2567. #define MCAN_TSS1_TSL_MASK (0xFFFF0000UL)
  2568. #define MCAN_TSS1_TSL_SHIFT (16U)
  2569. #define MCAN_TSS1_TSL_GET(x) (((uint32_t)(x) & MCAN_TSS1_TSL_MASK) >> MCAN_TSS1_TSL_SHIFT)
  2570. /*
  2571. * TSN (R)
  2572. *
  2573. * Timestamp New
  2574. * Each Timestamp register (TS0-TS15) is assigned one bit. The bits are set when a timestamp was stored in the related
  2575. * Timestamp register. Reading a Timestamp register resets the related bit.
  2576. */
  2577. #define MCAN_TSS1_TSN_MASK (0xFFFFU)
  2578. #define MCAN_TSS1_TSN_SHIFT (0U)
  2579. #define MCAN_TSS1_TSN_GET(x) (((uint32_t)(x) & MCAN_TSS1_TSN_MASK) >> MCAN_TSS1_TSN_SHIFT)
  2580. /* Bitfield definition for register: TSS2 */
  2581. /*
  2582. * TSP (R)
  2583. *
  2584. * Timestamp Pointer
  2585. * The Timestamp Pointer is incremented by one each time a timestamp is captured. From its maximum value (3, 7, or 15
  2586. * depending on number_ts_g), it is incremented to 0.
  2587. * Value also signalled on output m_can_tsp[3:0].
  2588. */
  2589. #define MCAN_TSS2_TSP_MASK (0xFU)
  2590. #define MCAN_TSS2_TSP_SHIFT (0U)
  2591. #define MCAN_TSS2_TSP_GET(x) (((uint32_t)(x) & MCAN_TSS2_TSP_MASK) >> MCAN_TSS2_TSP_SHIFT)
  2592. /* Bitfield definition for register: ATB */
  2593. /*
  2594. * TB (RC)
  2595. *
  2596. * timebase for timestamp generation 31-0
  2597. */
  2598. #define MCAN_ATB_TB_MASK (0xFFFFFFFFUL)
  2599. #define MCAN_ATB_TB_SHIFT (0U)
  2600. #define MCAN_ATB_TB_GET(x) (((uint32_t)(x) & MCAN_ATB_TB_MASK) >> MCAN_ATB_TB_SHIFT)
  2601. /* Bitfield definition for register: ATBH */
  2602. /*
  2603. * TBH (RC)
  2604. *
  2605. * timebase for timestamp generation 63-32
  2606. */
  2607. #define MCAN_ATBH_TBH_MASK (0xFFFFFFFFUL)
  2608. #define MCAN_ATBH_TBH_SHIFT (0U)
  2609. #define MCAN_ATBH_TBH_GET(x) (((uint32_t)(x) & MCAN_ATBH_TBH_MASK) >> MCAN_ATBH_TBH_SHIFT)
  2610. /* Bitfield definition for register: GLB_CTL */
  2611. /*
  2612. * M_CAN_STBY (RW)
  2613. *
  2614. * m_can standby control
  2615. */
  2616. #define MCAN_GLB_CTL_M_CAN_STBY_MASK (0x80000000UL)
  2617. #define MCAN_GLB_CTL_M_CAN_STBY_SHIFT (31U)
  2618. #define MCAN_GLB_CTL_M_CAN_STBY_SET(x) (((uint32_t)(x) << MCAN_GLB_CTL_M_CAN_STBY_SHIFT) & MCAN_GLB_CTL_M_CAN_STBY_MASK)
  2619. #define MCAN_GLB_CTL_M_CAN_STBY_GET(x) (((uint32_t)(x) & MCAN_GLB_CTL_M_CAN_STBY_MASK) >> MCAN_GLB_CTL_M_CAN_STBY_SHIFT)
  2620. /*
  2621. * STBY_CLR_EN (RW)
  2622. *
  2623. * m_can standby clear control
  2624. * 0:controlled by software by standby bit[bit31]
  2625. * 1:auto clear standby by hardware when rx data is 0
  2626. */
  2627. #define MCAN_GLB_CTL_STBY_CLR_EN_MASK (0x40000000UL)
  2628. #define MCAN_GLB_CTL_STBY_CLR_EN_SHIFT (30U)
  2629. #define MCAN_GLB_CTL_STBY_CLR_EN_SET(x) (((uint32_t)(x) << MCAN_GLB_CTL_STBY_CLR_EN_SHIFT) & MCAN_GLB_CTL_STBY_CLR_EN_MASK)
  2630. #define MCAN_GLB_CTL_STBY_CLR_EN_GET(x) (((uint32_t)(x) & MCAN_GLB_CTL_STBY_CLR_EN_MASK) >> MCAN_GLB_CTL_STBY_CLR_EN_SHIFT)
  2631. /*
  2632. * STBY_POL (RW)
  2633. *
  2634. * standby polarity selection
  2635. */
  2636. #define MCAN_GLB_CTL_STBY_POL_MASK (0x20000000UL)
  2637. #define MCAN_GLB_CTL_STBY_POL_SHIFT (29U)
  2638. #define MCAN_GLB_CTL_STBY_POL_SET(x) (((uint32_t)(x) << MCAN_GLB_CTL_STBY_POL_SHIFT) & MCAN_GLB_CTL_STBY_POL_MASK)
  2639. #define MCAN_GLB_CTL_STBY_POL_GET(x) (((uint32_t)(x) & MCAN_GLB_CTL_STBY_POL_MASK) >> MCAN_GLB_CTL_STBY_POL_SHIFT)
  2640. /*
  2641. * TSU_TBIN_SEL (RW)
  2642. *
  2643. */
  2644. #define MCAN_GLB_CTL_TSU_TBIN_SEL_MASK (0x7U)
  2645. #define MCAN_GLB_CTL_TSU_TBIN_SEL_SHIFT (0U)
  2646. #define MCAN_GLB_CTL_TSU_TBIN_SEL_SET(x) (((uint32_t)(x) << MCAN_GLB_CTL_TSU_TBIN_SEL_SHIFT) & MCAN_GLB_CTL_TSU_TBIN_SEL_MASK)
  2647. #define MCAN_GLB_CTL_TSU_TBIN_SEL_GET(x) (((uint32_t)(x) & MCAN_GLB_CTL_TSU_TBIN_SEL_MASK) >> MCAN_GLB_CTL_TSU_TBIN_SEL_SHIFT)
  2648. /* Bitfield definition for register: GLB_STATUS */
  2649. /*
  2650. * M_CAN_INT1 (R)
  2651. *
  2652. * m_can interrupt status1
  2653. */
  2654. #define MCAN_GLB_STATUS_M_CAN_INT1_MASK (0x8U)
  2655. #define MCAN_GLB_STATUS_M_CAN_INT1_SHIFT (3U)
  2656. #define MCAN_GLB_STATUS_M_CAN_INT1_GET(x) (((uint32_t)(x) & MCAN_GLB_STATUS_M_CAN_INT1_MASK) >> MCAN_GLB_STATUS_M_CAN_INT1_SHIFT)
  2657. /*
  2658. * M_CAN_INT0 (R)
  2659. *
  2660. * m_can interrupt status0
  2661. */
  2662. #define MCAN_GLB_STATUS_M_CAN_INT0_MASK (0x4U)
  2663. #define MCAN_GLB_STATUS_M_CAN_INT0_SHIFT (2U)
  2664. #define MCAN_GLB_STATUS_M_CAN_INT0_GET(x) (((uint32_t)(x) & MCAN_GLB_STATUS_M_CAN_INT0_MASK) >> MCAN_GLB_STATUS_M_CAN_INT0_SHIFT)
  2665. /* Bitfield definition for register array: MESSAGE_BUFF */
  2666. /*
  2667. * DATA (RW)
  2668. *
  2669. * m_can message buffer
  2670. */
  2671. #define MCAN_MESSAGE_BUFF_DATA_MASK (0xFFFFFFFFUL)
  2672. #define MCAN_MESSAGE_BUFF_DATA_SHIFT (0U)
  2673. #define MCAN_MESSAGE_BUFF_DATA_SET(x) (((uint32_t)(x) << MCAN_MESSAGE_BUFF_DATA_SHIFT) & MCAN_MESSAGE_BUFF_DATA_MASK)
  2674. #define MCAN_MESSAGE_BUFF_DATA_GET(x) (((uint32_t)(x) & MCAN_MESSAGE_BUFF_DATA_MASK) >> MCAN_MESSAGE_BUFF_DATA_SHIFT)
  2675. /* TS_SEL register group index macro definition */
  2676. #define MCAN_TS_SEL_TS_SEL0 (0UL)
  2677. #define MCAN_TS_SEL_TS_SEL1 (1UL)
  2678. #define MCAN_TS_SEL_TS_SEL2 (2UL)
  2679. #define MCAN_TS_SEL_TS_SEL3 (3UL)
  2680. #define MCAN_TS_SEL_TS_SEL4 (4UL)
  2681. #define MCAN_TS_SEL_TS_SEL5 (5UL)
  2682. #define MCAN_TS_SEL_TS_SEL6 (6UL)
  2683. #define MCAN_TS_SEL_TS_SEL7 (7UL)
  2684. #define MCAN_TS_SEL_TS_SEL8 (8UL)
  2685. #define MCAN_TS_SEL_TS_SEL9 (9UL)
  2686. #define MCAN_TS_SEL_TS_SEL10 (10UL)
  2687. #define MCAN_TS_SEL_TS_SEL11 (11UL)
  2688. #define MCAN_TS_SEL_TS_SEL12 (12UL)
  2689. #define MCAN_TS_SEL_TS_SEL13 (13UL)
  2690. #define MCAN_TS_SEL_TS_SEL14 (14UL)
  2691. #define MCAN_TS_SEL_TS_SEL15 (15UL)
  2692. /* MESSAGE_BUFF register group index macro definition */
  2693. #define MCAN_MESSAGE_BUFF_0 (0UL)
  2694. #define MCAN_MESSAGE_BUFF_1 (1UL)
  2695. #define MCAN_MESSAGE_BUFF_2 (2UL)
  2696. #define MCAN_MESSAGE_BUFF_3 (3UL)
  2697. #define MCAN_MESSAGE_BUFF_4 (4UL)
  2698. #define MCAN_MESSAGE_BUFF_5 (5UL)
  2699. #define MCAN_MESSAGE_BUFF_6 (6UL)
  2700. #define MCAN_MESSAGE_BUFF_7 (7UL)
  2701. #define MCAN_MESSAGE_BUFF_8 (8UL)
  2702. #define MCAN_MESSAGE_BUFF_9 (9UL)
  2703. #define MCAN_MESSAGE_BUFF_10 (10UL)
  2704. #define MCAN_MESSAGE_BUFF_11 (11UL)
  2705. #define MCAN_MESSAGE_BUFF_12 (12UL)
  2706. #define MCAN_MESSAGE_BUFF_13 (13UL)
  2707. #define MCAN_MESSAGE_BUFF_14 (14UL)
  2708. #define MCAN_MESSAGE_BUFF_15 (15UL)
  2709. #define MCAN_MESSAGE_BUFF_16 (16UL)
  2710. #define MCAN_MESSAGE_BUFF_17 (17UL)
  2711. #define MCAN_MESSAGE_BUFF_18 (18UL)
  2712. #define MCAN_MESSAGE_BUFF_19 (19UL)
  2713. #define MCAN_MESSAGE_BUFF_20 (20UL)
  2714. #define MCAN_MESSAGE_BUFF_21 (21UL)
  2715. #define MCAN_MESSAGE_BUFF_22 (22UL)
  2716. #define MCAN_MESSAGE_BUFF_23 (23UL)
  2717. #define MCAN_MESSAGE_BUFF_24 (24UL)
  2718. #define MCAN_MESSAGE_BUFF_25 (25UL)
  2719. #define MCAN_MESSAGE_BUFF_26 (26UL)
  2720. #define MCAN_MESSAGE_BUFF_27 (27UL)
  2721. #define MCAN_MESSAGE_BUFF_28 (28UL)
  2722. #define MCAN_MESSAGE_BUFF_29 (29UL)
  2723. #define MCAN_MESSAGE_BUFF_30 (30UL)
  2724. #define MCAN_MESSAGE_BUFF_31 (31UL)
  2725. #define MCAN_MESSAGE_BUFF_32 (32UL)
  2726. #define MCAN_MESSAGE_BUFF_33 (33UL)
  2727. #define MCAN_MESSAGE_BUFF_34 (34UL)
  2728. #define MCAN_MESSAGE_BUFF_35 (35UL)
  2729. #define MCAN_MESSAGE_BUFF_36 (36UL)
  2730. #define MCAN_MESSAGE_BUFF_37 (37UL)
  2731. #define MCAN_MESSAGE_BUFF_38 (38UL)
  2732. #define MCAN_MESSAGE_BUFF_39 (39UL)
  2733. #define MCAN_MESSAGE_BUFF_40 (40UL)
  2734. #define MCAN_MESSAGE_BUFF_41 (41UL)
  2735. #define MCAN_MESSAGE_BUFF_42 (42UL)
  2736. #define MCAN_MESSAGE_BUFF_43 (43UL)
  2737. #define MCAN_MESSAGE_BUFF_44 (44UL)
  2738. #define MCAN_MESSAGE_BUFF_45 (45UL)
  2739. #define MCAN_MESSAGE_BUFF_46 (46UL)
  2740. #define MCAN_MESSAGE_BUFF_47 (47UL)
  2741. #define MCAN_MESSAGE_BUFF_48 (48UL)
  2742. #define MCAN_MESSAGE_BUFF_49 (49UL)
  2743. #define MCAN_MESSAGE_BUFF_50 (50UL)
  2744. #define MCAN_MESSAGE_BUFF_51 (51UL)
  2745. #define MCAN_MESSAGE_BUFF_52 (52UL)
  2746. #define MCAN_MESSAGE_BUFF_53 (53UL)
  2747. #define MCAN_MESSAGE_BUFF_54 (54UL)
  2748. #define MCAN_MESSAGE_BUFF_55 (55UL)
  2749. #define MCAN_MESSAGE_BUFF_56 (56UL)
  2750. #define MCAN_MESSAGE_BUFF_57 (57UL)
  2751. #define MCAN_MESSAGE_BUFF_58 (58UL)
  2752. #define MCAN_MESSAGE_BUFF_59 (59UL)
  2753. #define MCAN_MESSAGE_BUFF_60 (60UL)
  2754. #define MCAN_MESSAGE_BUFF_61 (61UL)
  2755. #define MCAN_MESSAGE_BUFF_62 (62UL)
  2756. #define MCAN_MESSAGE_BUFF_63 (63UL)
  2757. #define MCAN_MESSAGE_BUFF_64 (64UL)
  2758. #define MCAN_MESSAGE_BUFF_65 (65UL)
  2759. #define MCAN_MESSAGE_BUFF_66 (66UL)
  2760. #define MCAN_MESSAGE_BUFF_67 (67UL)
  2761. #define MCAN_MESSAGE_BUFF_68 (68UL)
  2762. #define MCAN_MESSAGE_BUFF_69 (69UL)
  2763. #define MCAN_MESSAGE_BUFF_70 (70UL)
  2764. #define MCAN_MESSAGE_BUFF_71 (71UL)
  2765. #define MCAN_MESSAGE_BUFF_72 (72UL)
  2766. #define MCAN_MESSAGE_BUFF_73 (73UL)
  2767. #define MCAN_MESSAGE_BUFF_74 (74UL)
  2768. #define MCAN_MESSAGE_BUFF_75 (75UL)
  2769. #define MCAN_MESSAGE_BUFF_76 (76UL)
  2770. #define MCAN_MESSAGE_BUFF_77 (77UL)
  2771. #define MCAN_MESSAGE_BUFF_78 (78UL)
  2772. #define MCAN_MESSAGE_BUFF_79 (79UL)
  2773. #define MCAN_MESSAGE_BUFF_80 (80UL)
  2774. #define MCAN_MESSAGE_BUFF_81 (81UL)
  2775. #define MCAN_MESSAGE_BUFF_82 (82UL)
  2776. #define MCAN_MESSAGE_BUFF_83 (83UL)
  2777. #define MCAN_MESSAGE_BUFF_84 (84UL)
  2778. #define MCAN_MESSAGE_BUFF_85 (85UL)
  2779. #define MCAN_MESSAGE_BUFF_86 (86UL)
  2780. #define MCAN_MESSAGE_BUFF_87 (87UL)
  2781. #define MCAN_MESSAGE_BUFF_88 (88UL)
  2782. #define MCAN_MESSAGE_BUFF_89 (89UL)
  2783. #define MCAN_MESSAGE_BUFF_90 (90UL)
  2784. #define MCAN_MESSAGE_BUFF_91 (91UL)
  2785. #define MCAN_MESSAGE_BUFF_92 (92UL)
  2786. #define MCAN_MESSAGE_BUFF_93 (93UL)
  2787. #define MCAN_MESSAGE_BUFF_94 (94UL)
  2788. #define MCAN_MESSAGE_BUFF_95 (95UL)
  2789. #define MCAN_MESSAGE_BUFF_96 (96UL)
  2790. #define MCAN_MESSAGE_BUFF_97 (97UL)
  2791. #define MCAN_MESSAGE_BUFF_98 (98UL)
  2792. #define MCAN_MESSAGE_BUFF_99 (99UL)
  2793. #define MCAN_MESSAGE_BUFF_100 (100UL)
  2794. #define MCAN_MESSAGE_BUFF_101 (101UL)
  2795. #define MCAN_MESSAGE_BUFF_102 (102UL)
  2796. #define MCAN_MESSAGE_BUFF_103 (103UL)
  2797. #define MCAN_MESSAGE_BUFF_104 (104UL)
  2798. #define MCAN_MESSAGE_BUFF_105 (105UL)
  2799. #define MCAN_MESSAGE_BUFF_106 (106UL)
  2800. #define MCAN_MESSAGE_BUFF_107 (107UL)
  2801. #define MCAN_MESSAGE_BUFF_108 (108UL)
  2802. #define MCAN_MESSAGE_BUFF_109 (109UL)
  2803. #define MCAN_MESSAGE_BUFF_110 (110UL)
  2804. #define MCAN_MESSAGE_BUFF_111 (111UL)
  2805. #define MCAN_MESSAGE_BUFF_112 (112UL)
  2806. #define MCAN_MESSAGE_BUFF_113 (113UL)
  2807. #define MCAN_MESSAGE_BUFF_114 (114UL)
  2808. #define MCAN_MESSAGE_BUFF_115 (115UL)
  2809. #define MCAN_MESSAGE_BUFF_116 (116UL)
  2810. #define MCAN_MESSAGE_BUFF_117 (117UL)
  2811. #define MCAN_MESSAGE_BUFF_118 (118UL)
  2812. #define MCAN_MESSAGE_BUFF_119 (119UL)
  2813. #define MCAN_MESSAGE_BUFF_120 (120UL)
  2814. #define MCAN_MESSAGE_BUFF_121 (121UL)
  2815. #define MCAN_MESSAGE_BUFF_122 (122UL)
  2816. #define MCAN_MESSAGE_BUFF_123 (123UL)
  2817. #define MCAN_MESSAGE_BUFF_124 (124UL)
  2818. #define MCAN_MESSAGE_BUFF_125 (125UL)
  2819. #define MCAN_MESSAGE_BUFF_126 (126UL)
  2820. #define MCAN_MESSAGE_BUFF_127 (127UL)
  2821. #define MCAN_MESSAGE_BUFF_128 (128UL)
  2822. #define MCAN_MESSAGE_BUFF_129 (129UL)
  2823. #define MCAN_MESSAGE_BUFF_130 (130UL)
  2824. #define MCAN_MESSAGE_BUFF_131 (131UL)
  2825. #define MCAN_MESSAGE_BUFF_132 (132UL)
  2826. #define MCAN_MESSAGE_BUFF_133 (133UL)
  2827. #define MCAN_MESSAGE_BUFF_134 (134UL)
  2828. #define MCAN_MESSAGE_BUFF_135 (135UL)
  2829. #define MCAN_MESSAGE_BUFF_136 (136UL)
  2830. #define MCAN_MESSAGE_BUFF_137 (137UL)
  2831. #define MCAN_MESSAGE_BUFF_138 (138UL)
  2832. #define MCAN_MESSAGE_BUFF_139 (139UL)
  2833. #define MCAN_MESSAGE_BUFF_140 (140UL)
  2834. #define MCAN_MESSAGE_BUFF_141 (141UL)
  2835. #define MCAN_MESSAGE_BUFF_142 (142UL)
  2836. #define MCAN_MESSAGE_BUFF_143 (143UL)
  2837. #define MCAN_MESSAGE_BUFF_144 (144UL)
  2838. #define MCAN_MESSAGE_BUFF_145 (145UL)
  2839. #define MCAN_MESSAGE_BUFF_146 (146UL)
  2840. #define MCAN_MESSAGE_BUFF_147 (147UL)
  2841. #define MCAN_MESSAGE_BUFF_148 (148UL)
  2842. #define MCAN_MESSAGE_BUFF_149 (149UL)
  2843. #define MCAN_MESSAGE_BUFF_150 (150UL)
  2844. #define MCAN_MESSAGE_BUFF_151 (151UL)
  2845. #define MCAN_MESSAGE_BUFF_152 (152UL)
  2846. #define MCAN_MESSAGE_BUFF_153 (153UL)
  2847. #define MCAN_MESSAGE_BUFF_154 (154UL)
  2848. #define MCAN_MESSAGE_BUFF_155 (155UL)
  2849. #define MCAN_MESSAGE_BUFF_156 (156UL)
  2850. #define MCAN_MESSAGE_BUFF_157 (157UL)
  2851. #define MCAN_MESSAGE_BUFF_158 (158UL)
  2852. #define MCAN_MESSAGE_BUFF_159 (159UL)
  2853. #define MCAN_MESSAGE_BUFF_160 (160UL)
  2854. #define MCAN_MESSAGE_BUFF_161 (161UL)
  2855. #define MCAN_MESSAGE_BUFF_162 (162UL)
  2856. #define MCAN_MESSAGE_BUFF_163 (163UL)
  2857. #define MCAN_MESSAGE_BUFF_164 (164UL)
  2858. #define MCAN_MESSAGE_BUFF_165 (165UL)
  2859. #define MCAN_MESSAGE_BUFF_166 (166UL)
  2860. #define MCAN_MESSAGE_BUFF_167 (167UL)
  2861. #define MCAN_MESSAGE_BUFF_168 (168UL)
  2862. #define MCAN_MESSAGE_BUFF_169 (169UL)
  2863. #define MCAN_MESSAGE_BUFF_170 (170UL)
  2864. #define MCAN_MESSAGE_BUFF_171 (171UL)
  2865. #define MCAN_MESSAGE_BUFF_172 (172UL)
  2866. #define MCAN_MESSAGE_BUFF_173 (173UL)
  2867. #define MCAN_MESSAGE_BUFF_174 (174UL)
  2868. #define MCAN_MESSAGE_BUFF_175 (175UL)
  2869. #define MCAN_MESSAGE_BUFF_176 (176UL)
  2870. #define MCAN_MESSAGE_BUFF_177 (177UL)
  2871. #define MCAN_MESSAGE_BUFF_178 (178UL)
  2872. #define MCAN_MESSAGE_BUFF_179 (179UL)
  2873. #define MCAN_MESSAGE_BUFF_180 (180UL)
  2874. #define MCAN_MESSAGE_BUFF_181 (181UL)
  2875. #define MCAN_MESSAGE_BUFF_182 (182UL)
  2876. #define MCAN_MESSAGE_BUFF_183 (183UL)
  2877. #define MCAN_MESSAGE_BUFF_184 (184UL)
  2878. #define MCAN_MESSAGE_BUFF_185 (185UL)
  2879. #define MCAN_MESSAGE_BUFF_186 (186UL)
  2880. #define MCAN_MESSAGE_BUFF_187 (187UL)
  2881. #define MCAN_MESSAGE_BUFF_188 (188UL)
  2882. #define MCAN_MESSAGE_BUFF_189 (189UL)
  2883. #define MCAN_MESSAGE_BUFF_190 (190UL)
  2884. #define MCAN_MESSAGE_BUFF_191 (191UL)
  2885. #define MCAN_MESSAGE_BUFF_192 (192UL)
  2886. #define MCAN_MESSAGE_BUFF_193 (193UL)
  2887. #define MCAN_MESSAGE_BUFF_194 (194UL)
  2888. #define MCAN_MESSAGE_BUFF_195 (195UL)
  2889. #define MCAN_MESSAGE_BUFF_196 (196UL)
  2890. #define MCAN_MESSAGE_BUFF_197 (197UL)
  2891. #define MCAN_MESSAGE_BUFF_198 (198UL)
  2892. #define MCAN_MESSAGE_BUFF_199 (199UL)
  2893. #define MCAN_MESSAGE_BUFF_200 (200UL)
  2894. #define MCAN_MESSAGE_BUFF_201 (201UL)
  2895. #define MCAN_MESSAGE_BUFF_202 (202UL)
  2896. #define MCAN_MESSAGE_BUFF_203 (203UL)
  2897. #define MCAN_MESSAGE_BUFF_204 (204UL)
  2898. #define MCAN_MESSAGE_BUFF_205 (205UL)
  2899. #define MCAN_MESSAGE_BUFF_206 (206UL)
  2900. #define MCAN_MESSAGE_BUFF_207 (207UL)
  2901. #define MCAN_MESSAGE_BUFF_208 (208UL)
  2902. #define MCAN_MESSAGE_BUFF_209 (209UL)
  2903. #define MCAN_MESSAGE_BUFF_210 (210UL)
  2904. #define MCAN_MESSAGE_BUFF_211 (211UL)
  2905. #define MCAN_MESSAGE_BUFF_212 (212UL)
  2906. #define MCAN_MESSAGE_BUFF_213 (213UL)
  2907. #define MCAN_MESSAGE_BUFF_214 (214UL)
  2908. #define MCAN_MESSAGE_BUFF_215 (215UL)
  2909. #define MCAN_MESSAGE_BUFF_216 (216UL)
  2910. #define MCAN_MESSAGE_BUFF_217 (217UL)
  2911. #define MCAN_MESSAGE_BUFF_218 (218UL)
  2912. #define MCAN_MESSAGE_BUFF_219 (219UL)
  2913. #define MCAN_MESSAGE_BUFF_220 (220UL)
  2914. #define MCAN_MESSAGE_BUFF_221 (221UL)
  2915. #define MCAN_MESSAGE_BUFF_222 (222UL)
  2916. #define MCAN_MESSAGE_BUFF_223 (223UL)
  2917. #define MCAN_MESSAGE_BUFF_224 (224UL)
  2918. #define MCAN_MESSAGE_BUFF_225 (225UL)
  2919. #define MCAN_MESSAGE_BUFF_226 (226UL)
  2920. #define MCAN_MESSAGE_BUFF_227 (227UL)
  2921. #define MCAN_MESSAGE_BUFF_228 (228UL)
  2922. #define MCAN_MESSAGE_BUFF_229 (229UL)
  2923. #define MCAN_MESSAGE_BUFF_230 (230UL)
  2924. #define MCAN_MESSAGE_BUFF_231 (231UL)
  2925. #define MCAN_MESSAGE_BUFF_232 (232UL)
  2926. #define MCAN_MESSAGE_BUFF_233 (233UL)
  2927. #define MCAN_MESSAGE_BUFF_234 (234UL)
  2928. #define MCAN_MESSAGE_BUFF_235 (235UL)
  2929. #define MCAN_MESSAGE_BUFF_236 (236UL)
  2930. #define MCAN_MESSAGE_BUFF_237 (237UL)
  2931. #define MCAN_MESSAGE_BUFF_238 (238UL)
  2932. #define MCAN_MESSAGE_BUFF_239 (239UL)
  2933. #define MCAN_MESSAGE_BUFF_240 (240UL)
  2934. #define MCAN_MESSAGE_BUFF_241 (241UL)
  2935. #define MCAN_MESSAGE_BUFF_242 (242UL)
  2936. #define MCAN_MESSAGE_BUFF_243 (243UL)
  2937. #define MCAN_MESSAGE_BUFF_244 (244UL)
  2938. #define MCAN_MESSAGE_BUFF_245 (245UL)
  2939. #define MCAN_MESSAGE_BUFF_246 (246UL)
  2940. #define MCAN_MESSAGE_BUFF_247 (247UL)
  2941. #define MCAN_MESSAGE_BUFF_248 (248UL)
  2942. #define MCAN_MESSAGE_BUFF_249 (249UL)
  2943. #define MCAN_MESSAGE_BUFF_250 (250UL)
  2944. #define MCAN_MESSAGE_BUFF_251 (251UL)
  2945. #define MCAN_MESSAGE_BUFF_252 (252UL)
  2946. #define MCAN_MESSAGE_BUFF_253 (253UL)
  2947. #define MCAN_MESSAGE_BUFF_254 (254UL)
  2948. #define MCAN_MESSAGE_BUFF_255 (255UL)
  2949. #define MCAN_MESSAGE_BUFF_256 (256UL)
  2950. #define MCAN_MESSAGE_BUFF_257 (257UL)
  2951. #define MCAN_MESSAGE_BUFF_258 (258UL)
  2952. #define MCAN_MESSAGE_BUFF_259 (259UL)
  2953. #define MCAN_MESSAGE_BUFF_260 (260UL)
  2954. #define MCAN_MESSAGE_BUFF_261 (261UL)
  2955. #define MCAN_MESSAGE_BUFF_262 (262UL)
  2956. #define MCAN_MESSAGE_BUFF_263 (263UL)
  2957. #define MCAN_MESSAGE_BUFF_264 (264UL)
  2958. #define MCAN_MESSAGE_BUFF_265 (265UL)
  2959. #define MCAN_MESSAGE_BUFF_266 (266UL)
  2960. #define MCAN_MESSAGE_BUFF_267 (267UL)
  2961. #define MCAN_MESSAGE_BUFF_268 (268UL)
  2962. #define MCAN_MESSAGE_BUFF_269 (269UL)
  2963. #define MCAN_MESSAGE_BUFF_270 (270UL)
  2964. #define MCAN_MESSAGE_BUFF_271 (271UL)
  2965. #define MCAN_MESSAGE_BUFF_272 (272UL)
  2966. #define MCAN_MESSAGE_BUFF_273 (273UL)
  2967. #define MCAN_MESSAGE_BUFF_274 (274UL)
  2968. #define MCAN_MESSAGE_BUFF_275 (275UL)
  2969. #define MCAN_MESSAGE_BUFF_276 (276UL)
  2970. #define MCAN_MESSAGE_BUFF_277 (277UL)
  2971. #define MCAN_MESSAGE_BUFF_278 (278UL)
  2972. #define MCAN_MESSAGE_BUFF_279 (279UL)
  2973. #define MCAN_MESSAGE_BUFF_280 (280UL)
  2974. #define MCAN_MESSAGE_BUFF_281 (281UL)
  2975. #define MCAN_MESSAGE_BUFF_282 (282UL)
  2976. #define MCAN_MESSAGE_BUFF_283 (283UL)
  2977. #define MCAN_MESSAGE_BUFF_284 (284UL)
  2978. #define MCAN_MESSAGE_BUFF_285 (285UL)
  2979. #define MCAN_MESSAGE_BUFF_286 (286UL)
  2980. #define MCAN_MESSAGE_BUFF_287 (287UL)
  2981. #define MCAN_MESSAGE_BUFF_288 (288UL)
  2982. #define MCAN_MESSAGE_BUFF_289 (289UL)
  2983. #define MCAN_MESSAGE_BUFF_290 (290UL)
  2984. #define MCAN_MESSAGE_BUFF_291 (291UL)
  2985. #define MCAN_MESSAGE_BUFF_292 (292UL)
  2986. #define MCAN_MESSAGE_BUFF_293 (293UL)
  2987. #define MCAN_MESSAGE_BUFF_294 (294UL)
  2988. #define MCAN_MESSAGE_BUFF_295 (295UL)
  2989. #define MCAN_MESSAGE_BUFF_296 (296UL)
  2990. #define MCAN_MESSAGE_BUFF_297 (297UL)
  2991. #define MCAN_MESSAGE_BUFF_298 (298UL)
  2992. #define MCAN_MESSAGE_BUFF_299 (299UL)
  2993. #define MCAN_MESSAGE_BUFF_300 (300UL)
  2994. #define MCAN_MESSAGE_BUFF_301 (301UL)
  2995. #define MCAN_MESSAGE_BUFF_302 (302UL)
  2996. #define MCAN_MESSAGE_BUFF_303 (303UL)
  2997. #define MCAN_MESSAGE_BUFF_304 (304UL)
  2998. #define MCAN_MESSAGE_BUFF_305 (305UL)
  2999. #define MCAN_MESSAGE_BUFF_306 (306UL)
  3000. #define MCAN_MESSAGE_BUFF_307 (307UL)
  3001. #define MCAN_MESSAGE_BUFF_308 (308UL)
  3002. #define MCAN_MESSAGE_BUFF_309 (309UL)
  3003. #define MCAN_MESSAGE_BUFF_310 (310UL)
  3004. #define MCAN_MESSAGE_BUFF_311 (311UL)
  3005. #define MCAN_MESSAGE_BUFF_312 (312UL)
  3006. #define MCAN_MESSAGE_BUFF_313 (313UL)
  3007. #define MCAN_MESSAGE_BUFF_314 (314UL)
  3008. #define MCAN_MESSAGE_BUFF_315 (315UL)
  3009. #define MCAN_MESSAGE_BUFF_316 (316UL)
  3010. #define MCAN_MESSAGE_BUFF_317 (317UL)
  3011. #define MCAN_MESSAGE_BUFF_318 (318UL)
  3012. #define MCAN_MESSAGE_BUFF_319 (319UL)
  3013. #define MCAN_MESSAGE_BUFF_320 (320UL)
  3014. #define MCAN_MESSAGE_BUFF_321 (321UL)
  3015. #define MCAN_MESSAGE_BUFF_322 (322UL)
  3016. #define MCAN_MESSAGE_BUFF_323 (323UL)
  3017. #define MCAN_MESSAGE_BUFF_324 (324UL)
  3018. #define MCAN_MESSAGE_BUFF_325 (325UL)
  3019. #define MCAN_MESSAGE_BUFF_326 (326UL)
  3020. #define MCAN_MESSAGE_BUFF_327 (327UL)
  3021. #define MCAN_MESSAGE_BUFF_328 (328UL)
  3022. #define MCAN_MESSAGE_BUFF_329 (329UL)
  3023. #define MCAN_MESSAGE_BUFF_330 (330UL)
  3024. #define MCAN_MESSAGE_BUFF_331 (331UL)
  3025. #define MCAN_MESSAGE_BUFF_332 (332UL)
  3026. #define MCAN_MESSAGE_BUFF_333 (333UL)
  3027. #define MCAN_MESSAGE_BUFF_334 (334UL)
  3028. #define MCAN_MESSAGE_BUFF_335 (335UL)
  3029. #define MCAN_MESSAGE_BUFF_336 (336UL)
  3030. #define MCAN_MESSAGE_BUFF_337 (337UL)
  3031. #define MCAN_MESSAGE_BUFF_338 (338UL)
  3032. #define MCAN_MESSAGE_BUFF_339 (339UL)
  3033. #define MCAN_MESSAGE_BUFF_340 (340UL)
  3034. #define MCAN_MESSAGE_BUFF_341 (341UL)
  3035. #define MCAN_MESSAGE_BUFF_342 (342UL)
  3036. #define MCAN_MESSAGE_BUFF_343 (343UL)
  3037. #define MCAN_MESSAGE_BUFF_344 (344UL)
  3038. #define MCAN_MESSAGE_BUFF_345 (345UL)
  3039. #define MCAN_MESSAGE_BUFF_346 (346UL)
  3040. #define MCAN_MESSAGE_BUFF_347 (347UL)
  3041. #define MCAN_MESSAGE_BUFF_348 (348UL)
  3042. #define MCAN_MESSAGE_BUFF_349 (349UL)
  3043. #define MCAN_MESSAGE_BUFF_350 (350UL)
  3044. #define MCAN_MESSAGE_BUFF_351 (351UL)
  3045. #define MCAN_MESSAGE_BUFF_352 (352UL)
  3046. #define MCAN_MESSAGE_BUFF_353 (353UL)
  3047. #define MCAN_MESSAGE_BUFF_354 (354UL)
  3048. #define MCAN_MESSAGE_BUFF_355 (355UL)
  3049. #define MCAN_MESSAGE_BUFF_356 (356UL)
  3050. #define MCAN_MESSAGE_BUFF_357 (357UL)
  3051. #define MCAN_MESSAGE_BUFF_358 (358UL)
  3052. #define MCAN_MESSAGE_BUFF_359 (359UL)
  3053. #define MCAN_MESSAGE_BUFF_360 (360UL)
  3054. #define MCAN_MESSAGE_BUFF_361 (361UL)
  3055. #define MCAN_MESSAGE_BUFF_362 (362UL)
  3056. #define MCAN_MESSAGE_BUFF_363 (363UL)
  3057. #define MCAN_MESSAGE_BUFF_364 (364UL)
  3058. #define MCAN_MESSAGE_BUFF_365 (365UL)
  3059. #define MCAN_MESSAGE_BUFF_366 (366UL)
  3060. #define MCAN_MESSAGE_BUFF_367 (367UL)
  3061. #define MCAN_MESSAGE_BUFF_368 (368UL)
  3062. #define MCAN_MESSAGE_BUFF_369 (369UL)
  3063. #define MCAN_MESSAGE_BUFF_370 (370UL)
  3064. #define MCAN_MESSAGE_BUFF_371 (371UL)
  3065. #define MCAN_MESSAGE_BUFF_372 (372UL)
  3066. #define MCAN_MESSAGE_BUFF_373 (373UL)
  3067. #define MCAN_MESSAGE_BUFF_374 (374UL)
  3068. #define MCAN_MESSAGE_BUFF_375 (375UL)
  3069. #define MCAN_MESSAGE_BUFF_376 (376UL)
  3070. #define MCAN_MESSAGE_BUFF_377 (377UL)
  3071. #define MCAN_MESSAGE_BUFF_378 (378UL)
  3072. #define MCAN_MESSAGE_BUFF_379 (379UL)
  3073. #define MCAN_MESSAGE_BUFF_380 (380UL)
  3074. #define MCAN_MESSAGE_BUFF_381 (381UL)
  3075. #define MCAN_MESSAGE_BUFF_382 (382UL)
  3076. #define MCAN_MESSAGE_BUFF_383 (383UL)
  3077. #define MCAN_MESSAGE_BUFF_384 (384UL)
  3078. #define MCAN_MESSAGE_BUFF_385 (385UL)
  3079. #define MCAN_MESSAGE_BUFF_386 (386UL)
  3080. #define MCAN_MESSAGE_BUFF_387 (387UL)
  3081. #define MCAN_MESSAGE_BUFF_388 (388UL)
  3082. #define MCAN_MESSAGE_BUFF_389 (389UL)
  3083. #define MCAN_MESSAGE_BUFF_390 (390UL)
  3084. #define MCAN_MESSAGE_BUFF_391 (391UL)
  3085. #define MCAN_MESSAGE_BUFF_392 (392UL)
  3086. #define MCAN_MESSAGE_BUFF_393 (393UL)
  3087. #define MCAN_MESSAGE_BUFF_394 (394UL)
  3088. #define MCAN_MESSAGE_BUFF_395 (395UL)
  3089. #define MCAN_MESSAGE_BUFF_396 (396UL)
  3090. #define MCAN_MESSAGE_BUFF_397 (397UL)
  3091. #define MCAN_MESSAGE_BUFF_398 (398UL)
  3092. #define MCAN_MESSAGE_BUFF_399 (399UL)
  3093. #define MCAN_MESSAGE_BUFF_400 (400UL)
  3094. #define MCAN_MESSAGE_BUFF_401 (401UL)
  3095. #define MCAN_MESSAGE_BUFF_402 (402UL)
  3096. #define MCAN_MESSAGE_BUFF_403 (403UL)
  3097. #define MCAN_MESSAGE_BUFF_404 (404UL)
  3098. #define MCAN_MESSAGE_BUFF_405 (405UL)
  3099. #define MCAN_MESSAGE_BUFF_406 (406UL)
  3100. #define MCAN_MESSAGE_BUFF_407 (407UL)
  3101. #define MCAN_MESSAGE_BUFF_408 (408UL)
  3102. #define MCAN_MESSAGE_BUFF_409 (409UL)
  3103. #define MCAN_MESSAGE_BUFF_410 (410UL)
  3104. #define MCAN_MESSAGE_BUFF_411 (411UL)
  3105. #define MCAN_MESSAGE_BUFF_412 (412UL)
  3106. #define MCAN_MESSAGE_BUFF_413 (413UL)
  3107. #define MCAN_MESSAGE_BUFF_414 (414UL)
  3108. #define MCAN_MESSAGE_BUFF_415 (415UL)
  3109. #define MCAN_MESSAGE_BUFF_416 (416UL)
  3110. #define MCAN_MESSAGE_BUFF_417 (417UL)
  3111. #define MCAN_MESSAGE_BUFF_418 (418UL)
  3112. #define MCAN_MESSAGE_BUFF_419 (419UL)
  3113. #define MCAN_MESSAGE_BUFF_420 (420UL)
  3114. #define MCAN_MESSAGE_BUFF_421 (421UL)
  3115. #define MCAN_MESSAGE_BUFF_422 (422UL)
  3116. #define MCAN_MESSAGE_BUFF_423 (423UL)
  3117. #define MCAN_MESSAGE_BUFF_424 (424UL)
  3118. #define MCAN_MESSAGE_BUFF_425 (425UL)
  3119. #define MCAN_MESSAGE_BUFF_426 (426UL)
  3120. #define MCAN_MESSAGE_BUFF_427 (427UL)
  3121. #define MCAN_MESSAGE_BUFF_428 (428UL)
  3122. #define MCAN_MESSAGE_BUFF_429 (429UL)
  3123. #define MCAN_MESSAGE_BUFF_430 (430UL)
  3124. #define MCAN_MESSAGE_BUFF_431 (431UL)
  3125. #define MCAN_MESSAGE_BUFF_432 (432UL)
  3126. #define MCAN_MESSAGE_BUFF_433 (433UL)
  3127. #define MCAN_MESSAGE_BUFF_434 (434UL)
  3128. #define MCAN_MESSAGE_BUFF_435 (435UL)
  3129. #define MCAN_MESSAGE_BUFF_436 (436UL)
  3130. #define MCAN_MESSAGE_BUFF_437 (437UL)
  3131. #define MCAN_MESSAGE_BUFF_438 (438UL)
  3132. #define MCAN_MESSAGE_BUFF_439 (439UL)
  3133. #define MCAN_MESSAGE_BUFF_440 (440UL)
  3134. #define MCAN_MESSAGE_BUFF_441 (441UL)
  3135. #define MCAN_MESSAGE_BUFF_442 (442UL)
  3136. #define MCAN_MESSAGE_BUFF_443 (443UL)
  3137. #define MCAN_MESSAGE_BUFF_444 (444UL)
  3138. #define MCAN_MESSAGE_BUFF_445 (445UL)
  3139. #define MCAN_MESSAGE_BUFF_446 (446UL)
  3140. #define MCAN_MESSAGE_BUFF_447 (447UL)
  3141. #define MCAN_MESSAGE_BUFF_448 (448UL)
  3142. #define MCAN_MESSAGE_BUFF_449 (449UL)
  3143. #define MCAN_MESSAGE_BUFF_450 (450UL)
  3144. #define MCAN_MESSAGE_BUFF_451 (451UL)
  3145. #define MCAN_MESSAGE_BUFF_452 (452UL)
  3146. #define MCAN_MESSAGE_BUFF_453 (453UL)
  3147. #define MCAN_MESSAGE_BUFF_454 (454UL)
  3148. #define MCAN_MESSAGE_BUFF_455 (455UL)
  3149. #define MCAN_MESSAGE_BUFF_456 (456UL)
  3150. #define MCAN_MESSAGE_BUFF_457 (457UL)
  3151. #define MCAN_MESSAGE_BUFF_458 (458UL)
  3152. #define MCAN_MESSAGE_BUFF_459 (459UL)
  3153. #define MCAN_MESSAGE_BUFF_460 (460UL)
  3154. #define MCAN_MESSAGE_BUFF_461 (461UL)
  3155. #define MCAN_MESSAGE_BUFF_462 (462UL)
  3156. #define MCAN_MESSAGE_BUFF_463 (463UL)
  3157. #define MCAN_MESSAGE_BUFF_464 (464UL)
  3158. #define MCAN_MESSAGE_BUFF_465 (465UL)
  3159. #define MCAN_MESSAGE_BUFF_466 (466UL)
  3160. #define MCAN_MESSAGE_BUFF_467 (467UL)
  3161. #define MCAN_MESSAGE_BUFF_468 (468UL)
  3162. #define MCAN_MESSAGE_BUFF_469 (469UL)
  3163. #define MCAN_MESSAGE_BUFF_470 (470UL)
  3164. #define MCAN_MESSAGE_BUFF_471 (471UL)
  3165. #define MCAN_MESSAGE_BUFF_472 (472UL)
  3166. #define MCAN_MESSAGE_BUFF_473 (473UL)
  3167. #define MCAN_MESSAGE_BUFF_474 (474UL)
  3168. #define MCAN_MESSAGE_BUFF_475 (475UL)
  3169. #define MCAN_MESSAGE_BUFF_476 (476UL)
  3170. #define MCAN_MESSAGE_BUFF_477 (477UL)
  3171. #define MCAN_MESSAGE_BUFF_478 (478UL)
  3172. #define MCAN_MESSAGE_BUFF_479 (479UL)
  3173. #define MCAN_MESSAGE_BUFF_480 (480UL)
  3174. #define MCAN_MESSAGE_BUFF_481 (481UL)
  3175. #define MCAN_MESSAGE_BUFF_482 (482UL)
  3176. #define MCAN_MESSAGE_BUFF_483 (483UL)
  3177. #define MCAN_MESSAGE_BUFF_484 (484UL)
  3178. #define MCAN_MESSAGE_BUFF_485 (485UL)
  3179. #define MCAN_MESSAGE_BUFF_486 (486UL)
  3180. #define MCAN_MESSAGE_BUFF_487 (487UL)
  3181. #define MCAN_MESSAGE_BUFF_488 (488UL)
  3182. #define MCAN_MESSAGE_BUFF_489 (489UL)
  3183. #define MCAN_MESSAGE_BUFF_490 (490UL)
  3184. #define MCAN_MESSAGE_BUFF_491 (491UL)
  3185. #define MCAN_MESSAGE_BUFF_492 (492UL)
  3186. #define MCAN_MESSAGE_BUFF_493 (493UL)
  3187. #define MCAN_MESSAGE_BUFF_494 (494UL)
  3188. #define MCAN_MESSAGE_BUFF_495 (495UL)
  3189. #define MCAN_MESSAGE_BUFF_496 (496UL)
  3190. #define MCAN_MESSAGE_BUFF_497 (497UL)
  3191. #define MCAN_MESSAGE_BUFF_498 (498UL)
  3192. #define MCAN_MESSAGE_BUFF_499 (499UL)
  3193. #define MCAN_MESSAGE_BUFF_500 (500UL)
  3194. #define MCAN_MESSAGE_BUFF_501 (501UL)
  3195. #define MCAN_MESSAGE_BUFF_502 (502UL)
  3196. #define MCAN_MESSAGE_BUFF_503 (503UL)
  3197. #define MCAN_MESSAGE_BUFF_504 (504UL)
  3198. #define MCAN_MESSAGE_BUFF_505 (505UL)
  3199. #define MCAN_MESSAGE_BUFF_506 (506UL)
  3200. #define MCAN_MESSAGE_BUFF_507 (507UL)
  3201. #define MCAN_MESSAGE_BUFF_508 (508UL)
  3202. #define MCAN_MESSAGE_BUFF_509 (509UL)
  3203. #define MCAN_MESSAGE_BUFF_510 (510UL)
  3204. #define MCAN_MESSAGE_BUFF_511 (511UL)
  3205. #define MCAN_MESSAGE_BUFF_512 (512UL)
  3206. #define MCAN_MESSAGE_BUFF_513 (513UL)
  3207. #define MCAN_MESSAGE_BUFF_514 (514UL)
  3208. #define MCAN_MESSAGE_BUFF_515 (515UL)
  3209. #define MCAN_MESSAGE_BUFF_516 (516UL)
  3210. #define MCAN_MESSAGE_BUFF_517 (517UL)
  3211. #define MCAN_MESSAGE_BUFF_518 (518UL)
  3212. #define MCAN_MESSAGE_BUFF_519 (519UL)
  3213. #define MCAN_MESSAGE_BUFF_520 (520UL)
  3214. #define MCAN_MESSAGE_BUFF_521 (521UL)
  3215. #define MCAN_MESSAGE_BUFF_522 (522UL)
  3216. #define MCAN_MESSAGE_BUFF_523 (523UL)
  3217. #define MCAN_MESSAGE_BUFF_524 (524UL)
  3218. #define MCAN_MESSAGE_BUFF_525 (525UL)
  3219. #define MCAN_MESSAGE_BUFF_526 (526UL)
  3220. #define MCAN_MESSAGE_BUFF_527 (527UL)
  3221. #define MCAN_MESSAGE_BUFF_528 (528UL)
  3222. #define MCAN_MESSAGE_BUFF_529 (529UL)
  3223. #define MCAN_MESSAGE_BUFF_530 (530UL)
  3224. #define MCAN_MESSAGE_BUFF_531 (531UL)
  3225. #define MCAN_MESSAGE_BUFF_532 (532UL)
  3226. #define MCAN_MESSAGE_BUFF_533 (533UL)
  3227. #define MCAN_MESSAGE_BUFF_534 (534UL)
  3228. #define MCAN_MESSAGE_BUFF_535 (535UL)
  3229. #define MCAN_MESSAGE_BUFF_536 (536UL)
  3230. #define MCAN_MESSAGE_BUFF_537 (537UL)
  3231. #define MCAN_MESSAGE_BUFF_538 (538UL)
  3232. #define MCAN_MESSAGE_BUFF_539 (539UL)
  3233. #define MCAN_MESSAGE_BUFF_540 (540UL)
  3234. #define MCAN_MESSAGE_BUFF_541 (541UL)
  3235. #define MCAN_MESSAGE_BUFF_542 (542UL)
  3236. #define MCAN_MESSAGE_BUFF_543 (543UL)
  3237. #define MCAN_MESSAGE_BUFF_544 (544UL)
  3238. #define MCAN_MESSAGE_BUFF_545 (545UL)
  3239. #define MCAN_MESSAGE_BUFF_546 (546UL)
  3240. #define MCAN_MESSAGE_BUFF_547 (547UL)
  3241. #define MCAN_MESSAGE_BUFF_548 (548UL)
  3242. #define MCAN_MESSAGE_BUFF_549 (549UL)
  3243. #define MCAN_MESSAGE_BUFF_550 (550UL)
  3244. #define MCAN_MESSAGE_BUFF_551 (551UL)
  3245. #define MCAN_MESSAGE_BUFF_552 (552UL)
  3246. #define MCAN_MESSAGE_BUFF_553 (553UL)
  3247. #define MCAN_MESSAGE_BUFF_554 (554UL)
  3248. #define MCAN_MESSAGE_BUFF_555 (555UL)
  3249. #define MCAN_MESSAGE_BUFF_556 (556UL)
  3250. #define MCAN_MESSAGE_BUFF_557 (557UL)
  3251. #define MCAN_MESSAGE_BUFF_558 (558UL)
  3252. #define MCAN_MESSAGE_BUFF_559 (559UL)
  3253. #define MCAN_MESSAGE_BUFF_560 (560UL)
  3254. #define MCAN_MESSAGE_BUFF_561 (561UL)
  3255. #define MCAN_MESSAGE_BUFF_562 (562UL)
  3256. #define MCAN_MESSAGE_BUFF_563 (563UL)
  3257. #define MCAN_MESSAGE_BUFF_564 (564UL)
  3258. #define MCAN_MESSAGE_BUFF_565 (565UL)
  3259. #define MCAN_MESSAGE_BUFF_566 (566UL)
  3260. #define MCAN_MESSAGE_BUFF_567 (567UL)
  3261. #define MCAN_MESSAGE_BUFF_568 (568UL)
  3262. #define MCAN_MESSAGE_BUFF_569 (569UL)
  3263. #define MCAN_MESSAGE_BUFF_570 (570UL)
  3264. #define MCAN_MESSAGE_BUFF_571 (571UL)
  3265. #define MCAN_MESSAGE_BUFF_572 (572UL)
  3266. #define MCAN_MESSAGE_BUFF_573 (573UL)
  3267. #define MCAN_MESSAGE_BUFF_574 (574UL)
  3268. #define MCAN_MESSAGE_BUFF_575 (575UL)
  3269. #define MCAN_MESSAGE_BUFF_576 (576UL)
  3270. #define MCAN_MESSAGE_BUFF_577 (577UL)
  3271. #define MCAN_MESSAGE_BUFF_578 (578UL)
  3272. #define MCAN_MESSAGE_BUFF_579 (579UL)
  3273. #define MCAN_MESSAGE_BUFF_580 (580UL)
  3274. #define MCAN_MESSAGE_BUFF_581 (581UL)
  3275. #define MCAN_MESSAGE_BUFF_582 (582UL)
  3276. #define MCAN_MESSAGE_BUFF_583 (583UL)
  3277. #define MCAN_MESSAGE_BUFF_584 (584UL)
  3278. #define MCAN_MESSAGE_BUFF_585 (585UL)
  3279. #define MCAN_MESSAGE_BUFF_586 (586UL)
  3280. #define MCAN_MESSAGE_BUFF_587 (587UL)
  3281. #define MCAN_MESSAGE_BUFF_588 (588UL)
  3282. #define MCAN_MESSAGE_BUFF_589 (589UL)
  3283. #define MCAN_MESSAGE_BUFF_590 (590UL)
  3284. #define MCAN_MESSAGE_BUFF_591 (591UL)
  3285. #define MCAN_MESSAGE_BUFF_592 (592UL)
  3286. #define MCAN_MESSAGE_BUFF_593 (593UL)
  3287. #define MCAN_MESSAGE_BUFF_594 (594UL)
  3288. #define MCAN_MESSAGE_BUFF_595 (595UL)
  3289. #define MCAN_MESSAGE_BUFF_596 (596UL)
  3290. #define MCAN_MESSAGE_BUFF_597 (597UL)
  3291. #define MCAN_MESSAGE_BUFF_598 (598UL)
  3292. #define MCAN_MESSAGE_BUFF_599 (599UL)
  3293. #define MCAN_MESSAGE_BUFF_600 (600UL)
  3294. #define MCAN_MESSAGE_BUFF_601 (601UL)
  3295. #define MCAN_MESSAGE_BUFF_602 (602UL)
  3296. #define MCAN_MESSAGE_BUFF_603 (603UL)
  3297. #define MCAN_MESSAGE_BUFF_604 (604UL)
  3298. #define MCAN_MESSAGE_BUFF_605 (605UL)
  3299. #define MCAN_MESSAGE_BUFF_606 (606UL)
  3300. #define MCAN_MESSAGE_BUFF_607 (607UL)
  3301. #define MCAN_MESSAGE_BUFF_608 (608UL)
  3302. #define MCAN_MESSAGE_BUFF_609 (609UL)
  3303. #define MCAN_MESSAGE_BUFF_610 (610UL)
  3304. #define MCAN_MESSAGE_BUFF_611 (611UL)
  3305. #define MCAN_MESSAGE_BUFF_612 (612UL)
  3306. #define MCAN_MESSAGE_BUFF_613 (613UL)
  3307. #define MCAN_MESSAGE_BUFF_614 (614UL)
  3308. #define MCAN_MESSAGE_BUFF_615 (615UL)
  3309. #define MCAN_MESSAGE_BUFF_616 (616UL)
  3310. #define MCAN_MESSAGE_BUFF_617 (617UL)
  3311. #define MCAN_MESSAGE_BUFF_618 (618UL)
  3312. #define MCAN_MESSAGE_BUFF_619 (619UL)
  3313. #define MCAN_MESSAGE_BUFF_620 (620UL)
  3314. #define MCAN_MESSAGE_BUFF_621 (621UL)
  3315. #define MCAN_MESSAGE_BUFF_622 (622UL)
  3316. #define MCAN_MESSAGE_BUFF_623 (623UL)
  3317. #define MCAN_MESSAGE_BUFF_624 (624UL)
  3318. #define MCAN_MESSAGE_BUFF_625 (625UL)
  3319. #define MCAN_MESSAGE_BUFF_626 (626UL)
  3320. #define MCAN_MESSAGE_BUFF_627 (627UL)
  3321. #define MCAN_MESSAGE_BUFF_628 (628UL)
  3322. #define MCAN_MESSAGE_BUFF_629 (629UL)
  3323. #define MCAN_MESSAGE_BUFF_630 (630UL)
  3324. #define MCAN_MESSAGE_BUFF_631 (631UL)
  3325. #define MCAN_MESSAGE_BUFF_632 (632UL)
  3326. #define MCAN_MESSAGE_BUFF_633 (633UL)
  3327. #define MCAN_MESSAGE_BUFF_634 (634UL)
  3328. #define MCAN_MESSAGE_BUFF_635 (635UL)
  3329. #define MCAN_MESSAGE_BUFF_636 (636UL)
  3330. #define MCAN_MESSAGE_BUFF_637 (637UL)
  3331. #define MCAN_MESSAGE_BUFF_638 (638UL)
  3332. #define MCAN_MESSAGE_BUFF_639 (639UL)
  3333. #endif /* HPM_MCAN_H */