stm32h7xx_ll_bus.h 325 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914
  1. /**
  2. ******************************************************************************
  3. * @file stm32h7xx_ll_bus.h
  4. * @author MCD Application Team
  5. * @brief Header file of BUS LL module.
  6. @verbatim
  7. ##### RCC Limitations #####
  8. ==============================================================================
  9. [..]
  10. A delay between an RCC peripheral clock enable and the effective peripheral
  11. enabling should be taken into account in order to manage the peripheral read/write
  12. from/to registers.
  13. (+) This delay depends on the peripheral mapping.
  14. (++) AHB & APB peripherals, 1 dummy read is necessary
  15. [..]
  16. Workarounds:
  17. (#) For AHB & APB peripherals, a dummy read to the peripheral register has been
  18. inserted in each LL_{BUS}_GRP{x}_EnableClock() function.
  19. @endverbatim
  20. ******************************************************************************
  21. * @attention
  22. *
  23. * Copyright (c) 2017 STMicroelectronics.
  24. * All rights reserved.
  25. *
  26. * This software is licensed under terms that can be found in the LICENSE file in
  27. * the root directory of this software component.
  28. * If no LICENSE file comes with this software, it is provided AS-IS.
  29. ******************************************************************************
  30. */
  31. /* Define to prevent recursive inclusion -------------------------------------*/
  32. #ifndef STM32H7xx_LL_BUS_H
  33. #define STM32H7xx_LL_BUS_H
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. /* Includes ------------------------------------------------------------------*/
  38. #include "stm32h7xx.h"
  39. /** @addtogroup STM32H7xx_LL_Driver
  40. * @{
  41. */
  42. #if defined(RCC)
  43. /** @defgroup BUS_LL BUS
  44. * @{
  45. */
  46. /* Private variables ---------------------------------------------------------*/
  47. /* Private constants ---------------------------------------------------------*/
  48. /* Private macros ------------------------------------------------------------*/
  49. /* Exported types ------------------------------------------------------------*/
  50. /* Exported constants --------------------------------------------------------*/
  51. /** @defgroup BUS_LL_Exported_Constants BUS Exported Constants
  52. * @{
  53. */
  54. /** @defgroup BUS_LL_EC_AHB3_GRP1_PERIPH AHB3 GRP1 PERIPH
  55. * @{
  56. */
  57. #define LL_AHB3_GRP1_PERIPH_MDMA RCC_AHB3ENR_MDMAEN
  58. #define LL_AHB3_GRP1_PERIPH_DMA2D RCC_AHB3ENR_DMA2DEN
  59. #if defined(JPEG)
  60. #define LL_AHB3_GRP1_PERIPH_JPGDEC RCC_AHB3ENR_JPGDECEN
  61. #endif /* JPEG */
  62. #define LL_AHB3_GRP1_PERIPH_FMC RCC_AHB3ENR_FMCEN
  63. #if defined(QUADSPI)
  64. #define LL_AHB3_GRP1_PERIPH_QSPI RCC_AHB3ENR_QSPIEN
  65. #endif /* QUADSPI */
  66. #if defined(OCTOSPI1) || defined(OCTOSPI2)
  67. #define LL_AHB3_GRP1_PERIPH_OSPI1 RCC_AHB3ENR_OSPI1EN
  68. #define LL_AHB3_GRP1_PERIPH_OSPI2 RCC_AHB3ENR_OSPI2EN
  69. #endif /*(OCTOSPI1) || (OCTOSPI2)*/
  70. #if defined(OCTOSPIM)
  71. #define LL_AHB3_GRP1_PERIPH_OCTOSPIM RCC_AHB3ENR_IOMNGREN
  72. #endif /* OCTOSPIM */
  73. #if defined(OTFDEC1) || defined(OTFDEC2)
  74. #define LL_AHB3_GRP1_PERIPH_OTFDEC1 RCC_AHB3ENR_OTFDEC1EN
  75. #define LL_AHB3_GRP1_PERIPH_OTFDEC2 RCC_AHB3ENR_OTFDEC2EN
  76. #endif /* (OTFDEC1) || (OTFDEC2) */
  77. #if defined(GFXMMU)
  78. #define LL_AHB3_GRP1_PERIPH_GFXMMU RCC_AHB3ENR_GFXMMUEN
  79. #endif /* GFXMMU */
  80. #define LL_AHB3_GRP1_PERIPH_SDMMC1 RCC_AHB3ENR_SDMMC1EN
  81. #define LL_AHB3_GRP1_PERIPH_FLASH RCC_AHB3LPENR_FLASHLPEN
  82. #define LL_AHB3_GRP1_PERIPH_DTCM1 RCC_AHB3LPENR_DTCM1LPEN
  83. #define LL_AHB3_GRP1_PERIPH_DTCM2 RCC_AHB3LPENR_DTCM2LPEN
  84. #define LL_AHB3_GRP1_PERIPH_ITCM RCC_AHB3LPENR_ITCMLPEN
  85. #if defined(RCC_AHB3LPENR_AXISRAMLPEN)
  86. #define LL_AHB3_GRP1_PERIPH_AXISRAM RCC_AHB3LPENR_AXISRAMLPEN
  87. #else
  88. #define LL_AHB3_GRP1_PERIPH_AXISRAM1 RCC_AHB3LPENR_AXISRAM1LPEN
  89. #define LL_AHB3_GRP1_PERIPH_AXISRAM LL_AHB3_GRP1_PERIPH_AXISRAM1 /* for backward compatibility*/
  90. #endif /* RCC_AHB3LPENR_AXISRAMLPEN */
  91. #if defined(CD_AXISRAM2_BASE)
  92. #define LL_AHB3_GRP1_PERIPH_AXISRAM2 RCC_AHB3LPENR_AXISRAM2LPEN
  93. #endif /* CD_AXISRAM2_BASE */
  94. #if defined(CD_AXISRAM3_BASE)
  95. #define LL_AHB3_GRP1_PERIPH_AXISRAM3 RCC_AHB3LPENR_AXISRAM3LPEN
  96. #endif /* CD_AXISRAM3_BASE */
  97. /**
  98. * @}
  99. */
  100. /** @defgroup BUS_LL_EC_AHB1_GRP1_PERIPH AHB1 GRP1 PERIPH
  101. * @{
  102. */
  103. #define LL_AHB1_GRP1_PERIPH_DMA1 RCC_AHB1ENR_DMA1EN
  104. #define LL_AHB1_GRP1_PERIPH_DMA2 RCC_AHB1ENR_DMA2EN
  105. #define LL_AHB1_GRP1_PERIPH_ADC12 RCC_AHB1ENR_ADC12EN
  106. #if defined(DUAL_CORE)
  107. #define LL_AHB1_GRP1_PERIPH_ART RCC_AHB1ENR_ARTEN
  108. #endif /* DUAL_CORE */
  109. #if defined(RCC_AHB1ENR_CRCEN)
  110. #define LL_AHB1_GRP1_PERIPH_CRC RCC_AHB1ENR_CRCEN
  111. #endif /* RCC_AHB1ENR_CRCEN */
  112. #if defined(ETH)
  113. #define LL_AHB1_GRP1_PERIPH_ETH1MAC RCC_AHB1ENR_ETH1MACEN
  114. #define LL_AHB1_GRP1_PERIPH_ETH1TX RCC_AHB1ENR_ETH1TXEN
  115. #define LL_AHB1_GRP1_PERIPH_ETH1RX RCC_AHB1ENR_ETH1RXEN
  116. #endif /* ETH */
  117. #define LL_AHB1_GRP1_PERIPH_USB1OTGHS RCC_AHB1ENR_USB1OTGHSEN
  118. #define LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI RCC_AHB1ENR_USB1OTGHSULPIEN
  119. #if defined(USB2_OTG_FS)
  120. #define LL_AHB1_GRP1_PERIPH_USB2OTGHS RCC_AHB1ENR_USB2OTGHSEN
  121. #define LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI RCC_AHB1ENR_USB2OTGHSULPIEN
  122. #endif /* USB2_OTG_FS */
  123. /**
  124. * @}
  125. */
  126. /** @defgroup BUS_LL_EC_AHB2_GRP1_PERIPH AHB2 GRP1 PERIPH
  127. * @{
  128. */
  129. #define LL_AHB2_GRP1_PERIPH_DCMI RCC_AHB2ENR_DCMIEN
  130. #if defined(HSEM) && defined(RCC_AHB2ENR_HSEMEN)
  131. #define LL_AHB2_GRP1_PERIPH_HSEM RCC_AHB2ENR_HSEMEN
  132. #endif /* HSEM && RCC_AHB2ENR_HSEMEN */
  133. #if defined(CRYP)
  134. #define LL_AHB2_GRP1_PERIPH_CRYP RCC_AHB2ENR_CRYPEN
  135. #endif /* CRYP */
  136. #if defined(HASH)
  137. #define LL_AHB2_GRP1_PERIPH_HASH RCC_AHB2ENR_HASHEN
  138. #endif /* HASH */
  139. #define LL_AHB2_GRP1_PERIPH_RNG RCC_AHB2ENR_RNGEN
  140. #define LL_AHB2_GRP1_PERIPH_SDMMC2 RCC_AHB2ENR_SDMMC2EN
  141. #if defined(FMAC)
  142. #define LL_AHB2_GRP1_PERIPH_FMAC RCC_AHB2ENR_FMACEN
  143. #endif /* FMAC */
  144. #if defined(CORDIC)
  145. #define LL_AHB2_GRP1_PERIPH_CORDIC RCC_AHB2ENR_CORDICEN
  146. #endif /* CORDIC */
  147. #if defined(BDMA1)
  148. #define LL_AHB2_GRP1_PERIPH_BDMA1 RCC_AHB2ENR_BDMA1EN
  149. #endif /* BDMA1 */
  150. #if defined(RCC_AHB2ENR_D2SRAM1EN)
  151. #define LL_AHB2_GRP1_PERIPH_D2SRAM1 RCC_AHB2ENR_D2SRAM1EN
  152. #else
  153. #define LL_AHB2_GRP1_PERIPH_AHBSRAM1 RCC_AHB2ENR_AHBSRAM1EN
  154. #define LL_AHB2_GRP1_PERIPH_D2SRAM1 LL_AHB2_GRP1_PERIPH_AHBSRAM1 /* for backward compatibility*/
  155. #endif /* RCC_AHB2ENR_D2SRAM1EN */
  156. #if defined(RCC_AHB2ENR_D2SRAM2EN)
  157. #define LL_AHB2_GRP1_PERIPH_D2SRAM2 RCC_AHB2ENR_D2SRAM2EN
  158. #else
  159. #define LL_AHB2_GRP1_PERIPH_AHBSRAM2 RCC_AHB2ENR_AHBSRAM2EN
  160. #define LL_AHB2_GRP1_PERIPH_D2SRAM2 LL_AHB2_GRP1_PERIPH_AHBSRAM2 /* for backward compatibility*/
  161. #endif /* RCC_AHB2ENR_D2SRAM2EN */
  162. #if defined(RCC_AHB2ENR_D2SRAM3EN)
  163. #define LL_AHB2_GRP1_PERIPH_D2SRAM3 RCC_AHB2ENR_D2SRAM3EN
  164. #endif /* RCC_AHB2ENR_D2SRAM3EN */
  165. /**
  166. * @}
  167. */
  168. /** @defgroup BUS_LL_EC_AHB4_GRP1_PERIPH AHB4 GRP1 PERIPH
  169. * @{
  170. */
  171. #define LL_AHB4_GRP1_PERIPH_GPIOA RCC_AHB4ENR_GPIOAEN
  172. #define LL_AHB4_GRP1_PERIPH_GPIOB RCC_AHB4ENR_GPIOBEN
  173. #define LL_AHB4_GRP1_PERIPH_GPIOC RCC_AHB4ENR_GPIOCEN
  174. #define LL_AHB4_GRP1_PERIPH_GPIOD RCC_AHB4ENR_GPIODEN
  175. #define LL_AHB4_GRP1_PERIPH_GPIOE RCC_AHB4ENR_GPIOEEN
  176. #define LL_AHB4_GRP1_PERIPH_GPIOF RCC_AHB4ENR_GPIOFEN
  177. #define LL_AHB4_GRP1_PERIPH_GPIOG RCC_AHB4ENR_GPIOGEN
  178. #define LL_AHB4_GRP1_PERIPH_GPIOH RCC_AHB4ENR_GPIOHEN
  179. #if defined(GPIOI)
  180. #define LL_AHB4_GRP1_PERIPH_GPIOI RCC_AHB4ENR_GPIOIEN
  181. #endif /* GPIOI */
  182. #define LL_AHB4_GRP1_PERIPH_GPIOJ RCC_AHB4ENR_GPIOJEN
  183. #define LL_AHB4_GRP1_PERIPH_GPIOK RCC_AHB4ENR_GPIOKEN
  184. #if defined(RCC_AHB4ENR_CRCEN)
  185. #define LL_AHB4_GRP1_PERIPH_CRC RCC_AHB4ENR_CRCEN
  186. #endif /* RCC_AHB4ENR_CRCEN */
  187. #if defined(BDMA2)
  188. #define LL_AHB4_GRP1_PERIPH_BDMA2 RCC_AHB4ENR_BDMA2EN
  189. #define LL_AHB4_GRP1_PERIPH_BDMA LL_AHB4_GRP1_PERIPH_BDMA2 /* for backward compatibility*/
  190. #else
  191. #define LL_AHB4_GRP1_PERIPH_BDMA RCC_AHB4ENR_BDMAEN
  192. #endif /* BDMA2 */
  193. #if defined(ADC3)
  194. #define LL_AHB4_GRP1_PERIPH_ADC3 RCC_AHB4ENR_ADC3EN
  195. #endif /* ADC3 */
  196. #if defined(HSEM) && defined(RCC_AHB4ENR_HSEMEN)
  197. #define LL_AHB4_GRP1_PERIPH_HSEM RCC_AHB4ENR_HSEMEN
  198. #endif /* HSEM && RCC_AHB4ENR_HSEMEN*/
  199. #define LL_AHB4_GRP1_PERIPH_BKPRAM RCC_AHB4ENR_BKPRAMEN
  200. #if defined(RCC_AHB4LPENR_SRAM4LPEN)
  201. #define LL_AHB4_GRP1_PERIPH_SRAM4 RCC_AHB4LPENR_SRAM4LPEN
  202. #define LL_AHB4_GRP1_PERIPH_D3SRAM1 LL_AHB4_GRP1_PERIPH_SRAM4
  203. #else
  204. #define LL_AHB4_GRP1_PERIPH_SRDSRAM RCC_AHB4ENR_SRDSRAMEN
  205. #define LL_AHB4_GRP1_PERIPH_SRAM4 LL_AHB4_GRP1_PERIPH_SRDSRAM /* for backward compatibility*/
  206. #define LL_AHB4_GRP1_PERIPH_D3SRAM1 LL_AHB4_GRP1_PERIPH_SRDSRAM /* for backward compatibility*/
  207. #endif /* RCC_AHB4ENR_D3SRAM1EN */
  208. /**
  209. * @}
  210. */
  211. /** @defgroup BUS_LL_EC_APB3_GRP1_PERIPH APB3 GRP1 PERIPH
  212. * @{
  213. */
  214. #if defined(LTDC)
  215. #define LL_APB3_GRP1_PERIPH_LTDC RCC_APB3ENR_LTDCEN
  216. #endif /* LTDC */
  217. #if defined(DSI)
  218. #define LL_APB3_GRP1_PERIPH_DSI RCC_APB3ENR_DSIEN
  219. #endif /* DSI */
  220. #define LL_APB3_GRP1_PERIPH_WWDG1 RCC_APB3ENR_WWDG1EN
  221. #if defined(RCC_APB3ENR_WWDGEN)
  222. #define LL_APB3_GRP1_PERIPH_WWDG LL_APB3_GRP1_PERIPH_WWDG1 /* for backward compatibility*/
  223. #endif /* RCC_APB3ENR_WWDGEN */
  224. /**
  225. * @}
  226. */
  227. /** @defgroup BUS_LL_EC_APB1_GRP1_PERIPH APB1 GRP1 PERIPH
  228. * @{
  229. */
  230. #define LL_APB1_GRP1_PERIPH_TIM2 RCC_APB1LENR_TIM2EN
  231. #define LL_APB1_GRP1_PERIPH_TIM3 RCC_APB1LENR_TIM3EN
  232. #define LL_APB1_GRP1_PERIPH_TIM4 RCC_APB1LENR_TIM4EN
  233. #define LL_APB1_GRP1_PERIPH_TIM5 RCC_APB1LENR_TIM5EN
  234. #define LL_APB1_GRP1_PERIPH_TIM6 RCC_APB1LENR_TIM6EN
  235. #define LL_APB1_GRP1_PERIPH_TIM7 RCC_APB1LENR_TIM7EN
  236. #define LL_APB1_GRP1_PERIPH_TIM12 RCC_APB1LENR_TIM12EN
  237. #define LL_APB1_GRP1_PERIPH_TIM13 RCC_APB1LENR_TIM13EN
  238. #define LL_APB1_GRP1_PERIPH_TIM14 RCC_APB1LENR_TIM14EN
  239. #define LL_APB1_GRP1_PERIPH_LPTIM1 RCC_APB1LENR_LPTIM1EN
  240. #if defined(DUAL_CORE)
  241. #define LL_APB1_GRP1_PERIPH_WWDG2 RCC_APB1LENR_WWDG2EN
  242. #endif /*DUAL_CORE*/
  243. #define LL_APB1_GRP1_PERIPH_SPI2 RCC_APB1LENR_SPI2EN
  244. #define LL_APB1_GRP1_PERIPH_SPI3 RCC_APB1LENR_SPI3EN
  245. #define LL_APB1_GRP1_PERIPH_SPDIFRX RCC_APB1LENR_SPDIFRXEN
  246. #define LL_APB1_GRP1_PERIPH_USART2 RCC_APB1LENR_USART2EN
  247. #define LL_APB1_GRP1_PERIPH_USART3 RCC_APB1LENR_USART3EN
  248. #define LL_APB1_GRP1_PERIPH_UART4 RCC_APB1LENR_UART4EN
  249. #define LL_APB1_GRP1_PERIPH_UART5 RCC_APB1LENR_UART5EN
  250. #define LL_APB1_GRP1_PERIPH_I2C1 RCC_APB1LENR_I2C1EN
  251. #define LL_APB1_GRP1_PERIPH_I2C2 RCC_APB1LENR_I2C2EN
  252. #define LL_APB1_GRP1_PERIPH_I2C3 RCC_APB1LENR_I2C3EN
  253. #if defined(I2C5)
  254. #define LL_APB1_GRP1_PERIPH_I2C5 RCC_APB1LENR_I2C5EN
  255. #endif /* I2C5 */
  256. #if defined(RCC_APB1LENR_CECEN)
  257. #define LL_APB1_GRP1_PERIPH_CEC RCC_APB1LENR_CECEN
  258. #else
  259. #define LL_APB1_GRP1_PERIPH_HDMICEC RCC_APB1LENR_HDMICECEN
  260. #define LL_APB1_GRP1_PERIPH_CEC LL_APB1_GRP1_PERIPH_HDMICEC /* for backward compatibility*/
  261. #endif /* RCC_APB1LENR_CECEN */
  262. #define LL_APB1_GRP1_PERIPH_DAC12 RCC_APB1LENR_DAC12EN
  263. #define LL_APB1_GRP1_PERIPH_UART7 RCC_APB1LENR_UART7EN
  264. #define LL_APB1_GRP1_PERIPH_UART8 RCC_APB1LENR_UART8EN
  265. /**
  266. * @}
  267. */
  268. /** @defgroup BUS_LL_EC_APB1_GRP2_PERIPH APB1 GRP2 PERIPH
  269. * @{
  270. */
  271. #define LL_APB1_GRP2_PERIPH_CRS RCC_APB1HENR_CRSEN
  272. #define LL_APB1_GRP2_PERIPH_SWPMI1 RCC_APB1HENR_SWPMIEN
  273. #define LL_APB1_GRP2_PERIPH_OPAMP RCC_APB1HENR_OPAMPEN
  274. #define LL_APB1_GRP2_PERIPH_MDIOS RCC_APB1HENR_MDIOSEN
  275. #define LL_APB1_GRP2_PERIPH_FDCAN RCC_APB1HENR_FDCANEN
  276. #if defined(TIM23)
  277. #define LL_APB1_GRP2_PERIPH_TIM23 RCC_APB1HENR_TIM23EN
  278. #endif /* TIM23 */
  279. #if defined(TIM24)
  280. #define LL_APB1_GRP2_PERIPH_TIM24 RCC_APB1HENR_TIM24EN
  281. #endif /* TIM24 */
  282. /**
  283. * @}
  284. */
  285. /** @defgroup BUS_LL_EC_APB2_GRP1_PERIPH APB2 GRP1 PERIPH
  286. * @{
  287. */
  288. #define LL_APB2_GRP1_PERIPH_TIM1 RCC_APB2ENR_TIM1EN
  289. #define LL_APB2_GRP1_PERIPH_TIM8 RCC_APB2ENR_TIM8EN
  290. #define LL_APB2_GRP1_PERIPH_USART1 RCC_APB2ENR_USART1EN
  291. #define LL_APB2_GRP1_PERIPH_USART6 RCC_APB2ENR_USART6EN
  292. #if defined(UART9)
  293. #define LL_APB2_GRP1_PERIPH_UART9 RCC_APB2ENR_UART9EN
  294. #endif /* UART9 */
  295. #if defined(USART10)
  296. #define LL_APB2_GRP1_PERIPH_USART10 RCC_APB2ENR_USART10EN
  297. #endif /* USART10 */
  298. #define LL_APB2_GRP1_PERIPH_SPI1 RCC_APB2ENR_SPI1EN
  299. #define LL_APB2_GRP1_PERIPH_SPI4 RCC_APB2ENR_SPI4EN
  300. #define LL_APB2_GRP1_PERIPH_TIM15 RCC_APB2ENR_TIM15EN
  301. #define LL_APB2_GRP1_PERIPH_TIM16 RCC_APB2ENR_TIM16EN
  302. #define LL_APB2_GRP1_PERIPH_TIM17 RCC_APB2ENR_TIM17EN
  303. #define LL_APB2_GRP1_PERIPH_SPI5 RCC_APB2ENR_SPI5EN
  304. #define LL_APB2_GRP1_PERIPH_SAI1 RCC_APB2ENR_SAI1EN
  305. #if defined(SAI2)
  306. #define LL_APB2_GRP1_PERIPH_SAI2 RCC_APB2ENR_SAI2EN
  307. #endif /* SAI2 */
  308. #if defined(SAI3)
  309. #define LL_APB2_GRP1_PERIPH_SAI3 RCC_APB2ENR_SAI3EN
  310. #endif /* SAI3 */
  311. #define LL_APB2_GRP1_PERIPH_DFSDM1 RCC_APB2ENR_DFSDM1EN
  312. #if defined(HRTIM1)
  313. #define LL_APB2_GRP1_PERIPH_HRTIM RCC_APB2ENR_HRTIMEN
  314. #endif /* HRTIM1 */
  315. /**
  316. * @}
  317. */
  318. /** @defgroup BUS_LL_EC_APB4_GRP1_PERIPH APB4 GRP1 PERIPH
  319. * @{
  320. */
  321. #define LL_APB4_GRP1_PERIPH_SYSCFG RCC_APB4ENR_SYSCFGEN
  322. #define LL_APB4_GRP1_PERIPH_LPUART1 RCC_APB4ENR_LPUART1EN
  323. #define LL_APB4_GRP1_PERIPH_SPI6 RCC_APB4ENR_SPI6EN
  324. #define LL_APB4_GRP1_PERIPH_I2C4 RCC_APB4ENR_I2C4EN
  325. #define LL_APB4_GRP1_PERIPH_LPTIM2 RCC_APB4ENR_LPTIM2EN
  326. #define LL_APB4_GRP1_PERIPH_LPTIM3 RCC_APB4ENR_LPTIM3EN
  327. #if defined(LPTIM4)
  328. #define LL_APB4_GRP1_PERIPH_LPTIM4 RCC_APB4ENR_LPTIM4EN
  329. #endif /* LPTIM4 */
  330. #if defined(LPTIM5)
  331. #define LL_APB4_GRP1_PERIPH_LPTIM5 RCC_APB4ENR_LPTIM5EN
  332. #endif /* LPTIM5 */
  333. #if defined(DAC2)
  334. #define LL_APB4_GRP1_PERIPH_DAC2 RCC_APB4ENR_DAC2EN
  335. #endif /* DAC2 */
  336. #define LL_APB4_GRP1_PERIPH_COMP12 RCC_APB4ENR_COMP12EN
  337. #define LL_APB4_GRP1_PERIPH_VREF RCC_APB4ENR_VREFEN
  338. #define LL_APB4_GRP1_PERIPH_RTCAPB RCC_APB4ENR_RTCAPBEN
  339. #if defined(SAI4)
  340. #define LL_APB4_GRP1_PERIPH_SAI4 RCC_APB4ENR_SAI4EN
  341. #endif /* SAI4 */
  342. #if defined(DTS)
  343. #define LL_APB4_GRP1_PERIPH_DTS RCC_APB4ENR_DTSEN
  344. #endif /*DTS*/
  345. #if defined(DFSDM2_BASE)
  346. #define LL_APB4_GRP1_PERIPH_DFSDM2 RCC_APB4ENR_DFSDM2EN
  347. #endif /* DFSDM2_BASE */
  348. /**
  349. * @}
  350. */
  351. /** @defgroup BUS_LL_EC_CLKAM_PERIPH CLKAM PERIPH
  352. * @{
  353. */
  354. #if defined(RCC_D3AMR_BDMAAMEN)
  355. #define LL_CLKAM_PERIPH_BDMA RCC_D3AMR_BDMAAMEN
  356. #else
  357. #define LL_CLKAM_PERIPH_BDMA2 RCC_SRDAMR_BDMA2AMEN
  358. #define LL_CLKAM_PERIPH_BDMA LL_CLKAM_PERIPH_BDMA2 /* for backward compatibility*/
  359. #endif /* RCC_D3AMR_BDMAAMEN */
  360. #if defined(RCC_SRDAMR_GPIOAMEN)
  361. #define LL_CLKAM_PERIPH_GPIO RCC_SRDAMR_GPIOAMEN
  362. #endif /* RCC_SRDAMR_GPIOAMEN */
  363. #if defined(RCC_D3AMR_LPUART1AMEN)
  364. #define LL_CLKAM_PERIPH_LPUART1 RCC_D3AMR_LPUART1AMEN
  365. #else
  366. #define LL_CLKAM_PERIPH_LPUART1 RCC_SRDAMR_LPUART1AMEN
  367. #endif /* RCC_D3AMR_LPUART1AMEN */
  368. #if defined(RCC_D3AMR_SPI6AMEN)
  369. #define LL_CLKAM_PERIPH_SPI6 RCC_D3AMR_SPI6AMEN
  370. #else
  371. #define LL_CLKAM_PERIPH_SPI6 RCC_SRDAMR_SPI6AMEN
  372. #endif /* RCC_D3AMR_SPI6AMEN */
  373. #if defined(RCC_D3AMR_I2C4AMEN)
  374. #define LL_CLKAM_PERIPH_I2C4 RCC_D3AMR_I2C4AMEN
  375. #else
  376. #define LL_CLKAM_PERIPH_I2C4 RCC_SRDAMR_I2C4AMEN
  377. #endif /* RCC_D3AMR_I2C4AMEN */
  378. #if defined(RCC_D3AMR_LPTIM2AMEN)
  379. #define LL_CLKAM_PERIPH_LPTIM2 RCC_D3AMR_LPTIM2AMEN
  380. #else
  381. #define LL_CLKAM_PERIPH_LPTIM2 RCC_SRDAMR_LPTIM2AMEN
  382. #endif /* RCC_D3AMR_LPTIM2AMEN */
  383. #if defined(RCC_D3AMR_LPTIM3AMEN)
  384. #define LL_CLKAM_PERIPH_LPTIM3 RCC_D3AMR_LPTIM3AMEN
  385. #else
  386. #define LL_CLKAM_PERIPH_LPTIM3 RCC_SRDAMR_LPTIM3AMEN
  387. #endif /* RCC_D3AMR_LPTIM3AMEN */
  388. #if defined(RCC_D3AMR_LPTIM4AMEN)
  389. #define LL_CLKAM_PERIPH_LPTIM4 RCC_D3AMR_LPTIM4AMEN
  390. #endif /* RCC_D3AMR_LPTIM4AMEN */
  391. #if defined(RCC_D3AMR_LPTIM5AMEN)
  392. #define LL_CLKAM_PERIPH_LPTIM5 RCC_D3AMR_LPTIM5AMEN
  393. #endif /* RCC_D3AMR_LPTIM5AMEN */
  394. #if defined(DAC2)
  395. #define LL_CLKAM_PERIPH_DAC2 RCC_SRDAMR_DAC2AMEN
  396. #endif /* DAC2 */
  397. #if defined(RCC_D3AMR_COMP12AMEN)
  398. #define LL_CLKAM_PERIPH_COMP12 RCC_D3AMR_COMP12AMEN
  399. #else
  400. #define LL_CLKAM_PERIPH_COMP12 RCC_SRDAMR_COMP12AMEN
  401. #endif /* RCC_D3AMR_COMP12AMEN */
  402. #if defined(RCC_D3AMR_VREFAMEN)
  403. #define LL_CLKAM_PERIPH_VREF RCC_D3AMR_VREFAMEN
  404. #else
  405. #define LL_CLKAM_PERIPH_VREF RCC_SRDAMR_VREFAMEN
  406. #endif /* RCC_D3AMR_VREFAMEN */
  407. #if defined(RCC_D3AMR_RTCAMEN)
  408. #define LL_CLKAM_PERIPH_RTC RCC_D3AMR_RTCAMEN
  409. #else
  410. #define LL_CLKAM_PERIPH_RTC RCC_SRDAMR_RTCAMEN
  411. #endif /* RCC_D3AMR_RTCAMEN */
  412. #if defined(RCC_D3AMR_CRCAMEN)
  413. #define LL_CLKAM_PERIPH_CRC RCC_D3AMR_CRCAMEN
  414. #endif /* RCC_D3AMR_CRCAMEN */
  415. #if defined(SAI4)
  416. #define LL_CLKAM_PERIPH_SAI4 RCC_D3AMR_SAI4AMEN
  417. #endif /* SAI4 */
  418. #if defined(ADC3)
  419. #define LL_CLKAM_PERIPH_ADC3 RCC_D3AMR_ADC3AMEN
  420. #endif /* ADC3 */
  421. #if defined(RCC_SRDAMR_DTSAMEN)
  422. #define LL_CLKAM_PERIPH_DTS RCC_SRDAMR_DTSAMEN
  423. #endif /* RCC_SRDAMR_DTSAMEN */
  424. #if defined(RCC_D3AMR_DTSAMEN)
  425. #define LL_CLKAM_PERIPH_DTS RCC_D3AMR_DTSAMEN
  426. #endif /* RCC_D3AMR_DTSAMEN */
  427. #if defined(DFSDM2_BASE)
  428. #define LL_CLKAM_PERIPH_DFSDM2 RCC_SRDAMR_DFSDM2AMEN
  429. #endif /* DFSDM2_BASE */
  430. #if defined(RCC_D3AMR_BKPRAMAMEN)
  431. #define LL_CLKAM_PERIPH_BKPRAM RCC_D3AMR_BKPRAMAMEN
  432. #else
  433. #define LL_CLKAM_PERIPH_BKPRAM RCC_SRDAMR_BKPRAMAMEN
  434. #endif /* RCC_D3AMR_BKPRAMAMEN */
  435. #if defined(RCC_D3AMR_SRAM4AMEN)
  436. #define LL_CLKAM_PERIPH_SRAM4 RCC_D3AMR_SRAM4AMEN
  437. #else
  438. #define LL_CLKAM_PERIPH_SRDSRAM RCC_SRDAMR_SRDSRAMAMEN
  439. #define LL_CLKAM_PERIPH_SRAM4 LL_CLKAM_PERIPH_SRDSRAM
  440. #endif /* RCC_D3AMR_SRAM4AMEN */
  441. /**
  442. * @}
  443. */
  444. #if defined(RCC_CKGAENR_AXICKG)
  445. /** @defgroup BUS_LL_EC_CKGA_PERIPH CKGA (AXI Clocks Gating) PERIPH
  446. * @{
  447. */
  448. #define LL_CKGA_PERIPH_AXI RCC_CKGAENR_AXICKG
  449. #define LL_CKGA_PERIPH_AHB RCC_CKGAENR_AHBCKG
  450. #define LL_CKGA_PERIPH_CPU RCC_CKGAENR_CPUCKG
  451. #define LL_CKGA_PERIPH_SDMMC RCC_CKGAENR_SDMMCCKG
  452. #define LL_CKGA_PERIPH_MDMA RCC_CKGAENR_MDMACKG
  453. #define LL_CKGA_PERIPH_DMA2D RCC_CKGAENR_DMA2DCKG
  454. #define LL_CKGA_PERIPH_LTDC RCC_CKGAENR_LTDCCKG
  455. #define LL_CKGA_PERIPH_GFXMMUM RCC_CKGAENR_GFXMMUMCKG
  456. #define LL_CKGA_PERIPH_AHB12 RCC_CKGAENR_AHB12CKG
  457. #define LL_CKGA_PERIPH_AHB34 RCC_CKGAENR_AHB34CKG
  458. #define LL_CKGA_PERIPH_FLIFT RCC_CKGAENR_FLIFTCKG
  459. #define LL_CKGA_PERIPH_OCTOSPI2 RCC_CKGAENR_OCTOSPI2CKG
  460. #define LL_CKGA_PERIPH_FMC RCC_CKGAENR_FMCCKG
  461. #define LL_CKGA_PERIPH_OCTOSPI1 RCC_CKGAENR_OCTOSPI1CKG
  462. #define LL_CKGA_PERIPH_AXIRAM1 RCC_CKGAENR_AXIRAM1CKG
  463. #define LL_CKGA_PERIPH_AXIRAM2 RCC_CKGAENR_AXIRAM2CKG
  464. #define LL_CKGA_PERIPH_AXIRAM3 RCC_CKGAENR_AXIRAM3CKG
  465. #define LL_CKGA_PERIPH_GFXMMUS RCC_CKGAENR_GFXMMUSCKG
  466. #define LL_CKGA_PERIPH_ECCRAM RCC_CKGAENR_ECCRAMCKG
  467. #define LL_CKGA_PERIPH_EXTI RCC_CKGAENR_EXTICKG
  468. #define LL_CKGA_PERIPH_JTAG RCC_CKGAENR_JTAGCKG
  469. /**
  470. * @}
  471. */
  472. #endif /* RCC_CKGAENR_AXICKG */
  473. /**
  474. * @}
  475. */
  476. /* Exported macro ------------------------------------------------------------*/
  477. /* Exported functions --------------------------------------------------------*/
  478. /** @defgroup BUS_LL_Exported_Functions BUS Exported Functions
  479. * @{
  480. */
  481. /** @defgroup BUS_LL_EF_AHB3 AHB3
  482. * @{
  483. */
  484. /**
  485. * @brief Enable AHB3 peripherals clock.
  486. * @rmtoll AHB3ENR MDMAEN LL_AHB3_GRP1_EnableClock\n
  487. * AHB3ENR DMA2DEN LL_AHB3_GRP1_EnableClock\n
  488. * AHB3ENR JPGDECEN LL_AHB3_GRP1_EnableClock\n
  489. * AHB3ENR FMCEN LL_AHB3_GRP1_EnableClock\n
  490. * AHB3ENR QSPIEN LL_AHB3_GRP1_EnableClock\n (*)
  491. * AHB3ENR OSPI1EN LL_AHB3_GRP1_EnableClock\n (*)
  492. * AHB3ENR OSPI2EN LL_AHB3_GRP1_EnableClock\n (*)
  493. * AHB3ENR IOMNGREN LL_AHB3_GRP1_EnableClock\n (*)
  494. * AHB3ENR OTFDEC1EN LL_AHB3_GRP1_EnableClock\n (*)
  495. * AHB3ENR OTFDEC2EN LL_AHB3_GRP1_EnableClock\n (*)
  496. * AHB3ENR GFXMMUEN LL_AHB3_GRP1_EnableClock\n (*)
  497. * AHB3ENR SDMMC1EN LL_AHB3_GRP1_EnableClock\n
  498. * AHB3ENR FLASHEN LL_AHB3_GRP1_EnableClock\n (*)
  499. * AHB3ENR DTCM1EN LL_AHB3_GRP1_EnableClock\n (*)
  500. * AHB3ENR DTCM2EN LL_AHB3_GRP1_EnableClock\n (*)
  501. * AHB3ENR ITCMEN LL_AHB3_GRP1_EnableClock\n (*)
  502. * AHB3ENR AXISRAMEN LL_AHB3_GRP1_EnableClock (*)
  503. * @param Periphs This parameter can be a combination of the following values:
  504. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  505. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  506. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  507. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  508. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  509. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  510. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  511. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  512. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  513. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  514. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  515. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  516. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH (*)
  517. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 (*)
  518. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2 (*)
  519. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM (*)
  520. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  521. *
  522. * (*) value not defined in all devices.
  523. * @retval None
  524. */
  525. __STATIC_INLINE void LL_AHB3_GRP1_EnableClock(uint32_t Periphs)
  526. {
  527. __IO uint32_t tmpreg;
  528. SET_BIT(RCC->AHB3ENR, Periphs);
  529. /* Delay after an RCC peripheral clock enabling */
  530. tmpreg = READ_BIT(RCC->AHB3ENR, Periphs);
  531. (void)tmpreg;
  532. }
  533. /**
  534. * @brief Check if AHB3 peripheral clock is enabled or not
  535. * @rmtoll AHB3ENR MDMAEN LL_AHB3_GRP1_IsEnabledClock\n
  536. * AHB3ENR DMA2DEN LL_AHB3_GRP1_IsEnabledClock\n
  537. * AHB3ENR JPGDECEN LL_AHB3_GRP1_IsEnabledClock\n
  538. * AHB3ENR FMCEN LL_AHB3_GRP1_IsEnabledClock\n
  539. * AHB3ENR QSPIEN LL_AHB3_GRP1_IsEnabledClock\n (*)
  540. * AHB3ENR OSPI1EN LL_AHB3_GRP1_IsEnabledClock\n (*)
  541. * AHB3ENR OSPI2EN LL_AHB3_GRP1_IsEnabledClock\n (*)
  542. * AHB3ENR IOMNGREN LL_AHB3_GRP1_IsEnabledClock\n (*)
  543. * AHB3ENR OTFDEC1EN LL_AHB3_GRP1_IsEnabledClock\n (*)
  544. * AHB3ENR OTFDEC2EN LL_AHB3_GRP1_IsEnabledClock\n (*)
  545. * AHB3ENR GFXMMUEN LL_AHB3_GRP1_IsEnabledClock\n (*)
  546. * AHB3ENR SDMMC1EN LL_AHB3_GRP1_IsEnabledClock\n
  547. * AHB3ENR FLASHEN LL_AHB3_GRP1_IsEnabledClock\n (*)
  548. * AHB3ENR DTCM1EN LL_AHB3_GRP1_IsEnabledClock\n (*)
  549. * AHB3ENR DTCM2EN LL_AHB3_GRP1_IsEnabledClock\n (*)
  550. * AHB3ENR ITCMEN LL_AHB3_GRP1_IsEnabledClock\n (*)
  551. * AHB3ENR AXISRAMEN LL_AHB3_GRP1_IsEnabledClock (*)
  552. * @param Periphs This parameter can be a combination of the following values:
  553. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  554. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  555. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  556. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  557. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  558. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  559. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  560. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  561. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  562. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  563. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  564. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  565. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH (*)
  566. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 (*)
  567. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2 (*)
  568. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM (*)
  569. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  570. *
  571. * (*) value not defined in all devices.
  572. * @retval uint32_t
  573. */
  574. __STATIC_INLINE uint32_t LL_AHB3_GRP1_IsEnabledClock(uint32_t Periphs)
  575. {
  576. return ((READ_BIT(RCC->AHB3ENR, Periphs) == Periphs) ? 1U : 0U);
  577. }
  578. /**
  579. * @brief Disable AHB3 peripherals clock.
  580. * @rmtoll AHB3ENR MDMAEN LL_AHB3_GRP1_DisableClock\n
  581. * AHB3ENR DMA2DEN LL_AHB3_GRP1_DisableClock\n
  582. * AHB3ENR JPGDECEN LL_AHB3_GRP1_DisableClock\n
  583. * AHB3ENR FMCEN LL_AHB3_GRP1_DisableClock\n
  584. * AHB3ENR QSPIEN LL_AHB3_GRP1_DisableClock\n (*)
  585. * AHB3ENR OSPI1EN LL_AHB3_GRP1_DisableClock\n (*)
  586. * AHB3ENR OSPI2EN LL_AHB3_GRP1_DisableClock\n (*)
  587. * AHB3ENR IOMNGREN LL_AHB3_GRP1_DisableClock\n (*)
  588. * AHB3ENR OTFDEC1EN LL_AHB3_GRP1_DisableClock\n (*)
  589. * AHB3ENR OTFDEC2EN LL_AHB3_GRP1_DisableClock\n (*)
  590. * AHB3ENR GFXMMUEN LL_AHB3_GRP1_DisableClock\n (*)
  591. * AHB3ENR SDMMC1EN LL_AHB3_GRP1_DisableClock\n (*)
  592. * AHB3ENR FLASHEN LL_AHB3_GRP1_DisableClock\n (*)
  593. * AHB3ENR DTCM1EN LL_AHB3_GRP1_DisableClock\n (*)
  594. * AHB3ENR DTCM2EN LL_AHB3_GRP1_DisableClock\n (*)
  595. * AHB3ENR ITCMEN LL_AHB3_GRP1_DisableClock\n (*)
  596. * AHB3ENR AXISRAMEN LL_AHB3_GRP1_DisableClock
  597. * @param Periphs This parameter can be a combination of the following values:
  598. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  599. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  600. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  601. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  602. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  603. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  604. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  605. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  606. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  607. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  608. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  609. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  610. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH (*)
  611. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1 (*)
  612. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2 (*)
  613. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM (*)
  614. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  615. *
  616. * (*) value not defined in all devices.
  617. * @retval None
  618. */
  619. __STATIC_INLINE void LL_AHB3_GRP1_DisableClock(uint32_t Periphs)
  620. {
  621. CLEAR_BIT(RCC->AHB3ENR, Periphs);
  622. }
  623. /**
  624. * @brief Force AHB3 peripherals reset.
  625. * @rmtoll AHB3RSTR MDMARST LL_AHB3_GRP1_ForceReset\n
  626. * AHB3RSTR DMA2DRST LL_AHB3_GRP1_ForceReset\n
  627. * AHB3RSTR JPGDECRST LL_AHB3_GRP1_ForceReset\n
  628. * AHB3RSTR FMCRST LL_AHB3_GRP1_ForceReset\n
  629. * AHB3RSTR QSPIRST LL_AHB3_GRP1_ForceReset\n (*)
  630. * AHB3RSTR OSPI1RST LL_AHB3_GRP1_ForceReset\n (*)
  631. * AHB3RSTR OSPI2RST LL_AHB3_GRP1_ForceReset\n (*)
  632. * AHB3RSTR IOMNGRRST LL_AHB3_GRP1_ForceReset\n (*)
  633. * AHB3RSTR OTFDEC1RST LL_AHB3_GRP1_ForceReset\n (*)
  634. * AHB3RSTR OTFDEC2RST LL_AHB3_GRP1_ForceReset\n (*)
  635. * AHB3RSTR GFXMMURST LL_AHB3_GRP1_ForceReset\n (*)
  636. * AHB3RSTR SDMMC1RST LL_AHB3_GRP1_ForceReset
  637. * @param Periphs This parameter can be a combination of the following values:
  638. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  639. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  640. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  641. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  642. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  643. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  644. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  645. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  646. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  647. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  648. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  649. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  650. *
  651. * (*) value not defined in all devices.
  652. * @retval None
  653. */
  654. __STATIC_INLINE void LL_AHB3_GRP1_ForceReset(uint32_t Periphs)
  655. {
  656. SET_BIT(RCC->AHB3RSTR, Periphs);
  657. }
  658. /**
  659. * @brief Release AHB3 peripherals reset.
  660. * @rmtoll AHB3RSTR MDMARST LL_AHB3_GRP1_ReleaseReset\n
  661. * AHB3RSTR DMA2DRST LL_AHB3_GRP1_ReleaseReset\n
  662. * AHB3RSTR JPGDECRST LL_AHB3_GRP1_ReleaseReset\n
  663. * AHB3RSTR FMCRST LL_AHB3_GRP1_ReleaseReset\n
  664. * AHB3RSTR QSPIRST LL_AHB3_GRP1_ReleaseReset\n
  665. * AHB3RSTR OSPI1RST LL_AHB3_GRP1_ReleaseReset\n (*)
  666. * AHB3RSTR OSPI2RST LL_AHB3_GRP1_ReleaseReset\n (*)
  667. * AHB3RSTR IOMNGRRST LL_AHB3_GRP1_ReleaseReset\n (*)
  668. * AHB3RSTR OTFDEC1RST LL_AHB3_GRP1_ReleaseReset\n (*)
  669. * AHB3RSTR OTFDEC2RST LL_AHB3_GRP1_ReleaseReset\n (*)
  670. * AHB3RSTR GFXMMURST LL_AHB3_GRP1_ReleaseReset\n (*)
  671. * AHB3RSTR SDMMC1RST LL_AHB3_GRP1_ReleaseReset
  672. * @param Periphs This parameter can be a combination of the following values:
  673. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  674. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  675. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  676. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  677. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  678. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  679. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  680. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  681. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  682. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  683. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  684. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  685. *
  686. * (*) value not defined in all devices.
  687. * @retval None
  688. */
  689. __STATIC_INLINE void LL_AHB3_GRP1_ReleaseReset(uint32_t Periphs)
  690. {
  691. CLEAR_BIT(RCC->AHB3RSTR, Periphs);
  692. }
  693. /**
  694. * @brief Enable AHB3 peripherals clock during Low Power (Sleep) mode.
  695. * @rmtoll AHB3LPENR MDMALPEN LL_AHB3_GRP1_EnableClockSleep\n
  696. * AHB3LPENR DMA2DLPEN LL_AHB3_GRP1_EnableClockSleep\n
  697. * AHB3LPENR JPGDECLPEN LL_AHB3_GRP1_EnableClockSleep\n
  698. * AHB3LPENR FMCLPEN LL_AHB3_GRP1_EnableClockSleep\n
  699. * AHB3LPENR QSPILPEN LL_AHB3_GRP1_EnableClockSleep\n (*)
  700. * AHB3LPENR OSPI1LPEN LL_AHB3_GRP1_EnableClockSleep\n (*)
  701. * AHB3LPENR OSPI2LPEN LL_AHB3_GRP1_EnableClockSleep\n (*)
  702. * AHB3LPENR IOMNGRLPEN LL_AHB3_GRP1_EnableClockSleep\n (*)
  703. * AHB3LPENR OTFDEC1LPEN LL_AHB3_GRP1_EnableClockSleep\n (*)
  704. * AHB3LPENR OTFDEC1LPEN LL_AHB3_GRP1_EnableClockSleep\n (*)
  705. * AHB3LPENR GFXMMULPEN LL_AHB3_GRP1_EnableClockSleep\n (*)
  706. * AHB3LPENR SDMMC1LPEN LL_AHB3_GRP1_EnableClockSleep\n
  707. * AHB3LPENR FLASHLPEN LL_AHB3_GRP1_EnableClockSleep\n
  708. * AHB3LPENR DTCM1LPEN LL_AHB3_GRP1_EnableClockSleep\n
  709. * AHB3LPENR DTCM2LPEN LL_AHB3_GRP1_EnableClockSleep\n
  710. * AHB3LPENR ITCMLPEN LL_AHB3_GRP1_EnableClockSleep\n
  711. * AHB3LPENR AXISRAMLPEN LL_AHB3_GRP1_EnableClockSleep
  712. * @param Periphs This parameter can be a combination of the following values:
  713. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  714. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  715. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  716. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  717. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  718. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  719. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  720. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  721. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  722. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  723. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  724. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH
  725. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1
  726. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2
  727. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM
  728. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  729. *
  730. * (*) value not defined in all devices.
  731. * @retval None
  732. */
  733. __STATIC_INLINE void LL_AHB3_GRP1_EnableClockSleep(uint32_t Periphs)
  734. {
  735. __IO uint32_t tmpreg;
  736. SET_BIT(RCC->AHB3LPENR, Periphs);
  737. /* Delay after an RCC peripheral clock enabling */
  738. tmpreg = READ_BIT(RCC->AHB3LPENR, Periphs);
  739. (void)tmpreg;
  740. }
  741. /**
  742. * @brief Disable AHB3 peripherals clock during Low Power (Sleep) mode.
  743. * @rmtoll AHB3LPENR MDMALPEN LL_AHB3_GRP1_DisableClockSleep\n
  744. * AHB3LPENR DMA2DLPEN LL_AHB3_GRP1_DisableClockSleep\n
  745. * AHB3LPENR JPGDECLPEN LL_AHB3_GRP1_DisableClockSleep\n
  746. * AHB3LPENR FMCLPEN LL_AHB3_GRP1_DisableClockSleep\n
  747. * AHB3LPENR QSPILPEN LL_AHB3_GRP1_DisableClockSleep\n
  748. * AHB3LPENR OSPI1LPEN LL_AHB3_GRP1_DisableClockSleep\n (*)
  749. * AHB3LPENR OSPI2LPEN LL_AHB3_GRP1_DisableClockSleep\n (*)
  750. * AHB3LPENR IOMNGRLPEN LL_AHB3_GRP1_DisableClockSleep\n (*)
  751. * AHB3LPENR OTFDEC1LPEN LL_AHB3_GRP1_DisableClockSleep\n (*)
  752. * AHB3LPENR OTFDEC1LPEN LL_AHB3_GRP1_DisableClockSleep\n (*)
  753. * AHB3LPENR GFXMMULPEN LL_AHB3_GRP1_DisableClockSleep\n (*)
  754. * AHB3LPENR SDMMC1LPEN LL_AHB3_GRP1_DisableClockSleep\n
  755. * AHB3LPENR FLASHLPEN LL_AHB3_GRP1_DisableClockSleep\n
  756. * AHB3LPENR DTCM1LPEN LL_AHB3_GRP1_DisableClockSleep\n
  757. * AHB3LPENR DTCM2LPEN LL_AHB3_GRP1_DisableClockSleep\n
  758. * AHB3LPENR ITCMLPEN LL_AHB3_GRP1_DisableClockSleep\n
  759. * AHB3LPENR AXISRAMLPEN LL_AHB3_GRP1_DisableClockSleep
  760. * @param Periphs This parameter can be a combination of the following values:
  761. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  762. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  763. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  764. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  765. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  766. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  767. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  768. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  769. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  770. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  771. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  772. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH
  773. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1
  774. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2
  775. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM
  776. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  777. *
  778. * (*) value not defined in all devices.
  779. * @retval None
  780. */
  781. __STATIC_INLINE void LL_AHB3_GRP1_DisableClockSleep(uint32_t Periphs)
  782. {
  783. CLEAR_BIT(RCC->AHB3LPENR, Periphs);
  784. }
  785. /**
  786. * @}
  787. */
  788. /** @defgroup BUS_LL_EF_AHB1 AHB1
  789. * @{
  790. */
  791. /**
  792. * @brief Enable AHB1 peripherals clock.
  793. * @rmtoll AHB1ENR DMA1EN LL_AHB1_GRP1_EnableClock\n
  794. * AHB1ENR DMA2EN LL_AHB1_GRP1_EnableClock\n
  795. * AHB1ENR ADC12EN LL_AHB1_GRP1_EnableClock\n
  796. * AHB1ENR ARTEN LL_AHB1_GRP1_EnableClock\n
  797. * AHB1ENR CRCEN LL_AHB1_GRP1_EnableClock\n (*)
  798. * AHB1ENR ETH1MACEN LL_AHB1_GRP1_EnableClock\n (*)
  799. * AHB1ENR ETH1TXEN LL_AHB1_GRP1_EnableClock\n (*)
  800. * AHB1ENR ETH1RXEN LL_AHB1_GRP1_EnableClock\n (*)
  801. * AHB1ENR USB1OTGHSEN LL_AHB1_GRP1_EnableClock\n
  802. * AHB1ENR USB1OTGHSULPIEN LL_AHB1_GRP1_EnableClock\n
  803. * AHB1ENR USB2OTGHSEN LL_AHB1_GRP1_EnableClock\n (*)
  804. * AHB1ENR USB2OTGHSULPIEN LL_AHB1_GRP1_EnableClock (*)
  805. * @param Periphs This parameter can be a combination of the following values:
  806. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  807. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  808. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  809. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  810. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  811. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  812. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  813. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  814. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  815. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  816. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  817. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  818. *
  819. * (*) value not defined in all devices.
  820. * @retval None
  821. */
  822. __STATIC_INLINE void LL_AHB1_GRP1_EnableClock(uint32_t Periphs)
  823. {
  824. __IO uint32_t tmpreg;
  825. SET_BIT(RCC->AHB1ENR, Periphs);
  826. /* Delay after an RCC peripheral clock enabling */
  827. tmpreg = READ_BIT(RCC->AHB1ENR, Periphs);
  828. (void)tmpreg;
  829. }
  830. /**
  831. * @brief Check if AHB1 peripheral clock is enabled or not
  832. * @rmtoll AHB1ENR DMA1EN LL_AHB1_GRP1_IsEnabledClock\n
  833. * AHB1ENR DMA2EN LL_AHB1_GRP1_IsEnabledClock\n
  834. * AHB1ENR ADC12EN LL_AHB1_GRP1_IsEnabledClock\n
  835. * AHB1ENR ARTEN LL_AHB1_GRP1_IsEnabledClock\n (*)
  836. * AHB1ENR CRCEN LL_AHB1_GRP1_IsEnabledClock\n (*)
  837. * AHB1ENR ETH1MACEN LL_AHB1_GRP1_IsEnabledClock\n (*)
  838. * AHB1ENR ETH1TXEN LL_AHB1_GRP1_IsEnabledClock\n (*)
  839. * AHB1ENR ETH1RXEN LL_AHB1_GRP1_IsEnabledClock\n (*)
  840. * AHB1ENR USB1OTGHSEN LL_AHB1_GRP1_IsEnabledClock\n
  841. * AHB1ENR USB1OTGHSULPIEN LL_AHB1_GRP1_IsEnabledClock\n
  842. * AHB1ENR USB2OTGHSEN LL_AHB1_GRP1_IsEnabledClock\n (*)
  843. * AHB1ENR USB2OTGHSULPIEN LL_AHB1_GRP1_IsEnabledClock (*)
  844. * @param Periphs This parameter can be a combination of the following values:
  845. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  846. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  847. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  848. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  849. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  850. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  851. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  852. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  853. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  854. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  855. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  856. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  857. *
  858. * (*) value not defined in all devices.
  859. * @retval uint32_t
  860. */
  861. __STATIC_INLINE uint32_t LL_AHB1_GRP1_IsEnabledClock(uint32_t Periphs)
  862. {
  863. return ((READ_BIT(RCC->AHB1ENR, Periphs) == Periphs) ? 1U : 0U);
  864. }
  865. /**
  866. * @brief Disable AHB1 peripherals clock.
  867. * @rmtoll AHB1ENR DMA1EN LL_AHB1_GRP1_DisableClock\n
  868. * AHB1ENR DMA2EN LL_AHB1_GRP1_DisableClock\n
  869. * AHB1ENR ADC12EN LL_AHB1_GRP1_DisableClock\n
  870. * AHB1ENR ARTEN LL_AHB1_GRP1_DisableClock\n (*)
  871. * AHB1ENR CRCEN LL_AHB1_GRP1_DisableClock\n (*)
  872. * AHB1ENR ETH1MACEN LL_AHB1_GRP1_DisableClock\n (*)
  873. * AHB1ENR ETH1TXEN LL_AHB1_GRP1_DisableClock\n (*)
  874. * AHB1ENR ETH1RXEN LL_AHB1_GRP1_DisableClock\n (*)
  875. * AHB1ENR USB1OTGHSEN LL_AHB1_GRP1_DisableClock\n
  876. * AHB1ENR USB1OTGHSULPIEN LL_AHB1_GRP1_DisableClock\n
  877. * AHB1ENR USB2OTGHSEN LL_AHB1_GRP1_DisableClock\n (*)
  878. * AHB1ENR USB2OTGHSULPIEN LL_AHB1_GRP1_DisableClock (*)
  879. * @param Periphs This parameter can be a combination of the following values:
  880. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  881. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  882. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  883. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  884. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  885. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  886. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  887. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  888. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  889. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  890. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  891. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  892. *
  893. * (*) value not defined in all devices.
  894. * @retval None
  895. */
  896. __STATIC_INLINE void LL_AHB1_GRP1_DisableClock(uint32_t Periphs)
  897. {
  898. CLEAR_BIT(RCC->AHB1ENR, Periphs);
  899. }
  900. /**
  901. * @brief Force AHB1 peripherals reset.
  902. * @rmtoll AHB1RSTR DMA1RST LL_AHB1_GRP1_ForceReset\n
  903. * AHB1RSTR DMA2RST LL_AHB1_GRP1_ForceReset\n
  904. * AHB1RSTR ADC12RST LL_AHB1_GRP1_ForceReset\n
  905. * AHB1RSTR ARTRST LL_AHB1_GRP1_ForceReset\n (*)
  906. * AHB1RSTR CRCRST LL_AHB1_GRP1_ForceReset\n (*)
  907. * AHB1RSTR ETH1MACRST LL_AHB1_GRP1_ForceReset\n (*)
  908. * AHB1RSTR USB1OTGHSRST LL_AHB1_GRP1_ForceReset\n
  909. * AHB1RSTR USB2OTGHSRST LL_AHB1_GRP1_ForceReset (*)
  910. * @param Periphs This parameter can be a combination of the following values:
  911. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  912. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  913. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  914. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  915. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  916. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  917. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  918. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  919. *
  920. * (*) value not defined in all devices.
  921. * @retval None
  922. */
  923. __STATIC_INLINE void LL_AHB1_GRP1_ForceReset(uint32_t Periphs)
  924. {
  925. SET_BIT(RCC->AHB1RSTR, Periphs);
  926. }
  927. /**
  928. * @brief Release AHB1 peripherals reset.
  929. * @rmtoll AHB1RSTR DMA1RST LL_AHB1_GRP1_ReleaseReset\n
  930. * AHB1RSTR DMA2RST LL_AHB1_GRP1_ReleaseReset\n
  931. * AHB1RSTR ADC12RST LL_AHB1_GRP1_ReleaseReset\n
  932. * AHB1RSTR ARTRST LL_AHB1_GRP1_ReleaseReset\n (*)
  933. * AHB1RSTR CRCRST LL_AHB1_GRP1_ReleaseReset\n (*)
  934. * AHB1RSTR ETH1MACRST LL_AHB1_GRP1_ReleaseReset\n (*)
  935. * AHB1RSTR USB1OTGHSRST LL_AHB1_GRP1_ReleaseReset\n
  936. * AHB1RSTR USB2OTGHSRST LL_AHB1_GRP1_ReleaseReset (*)
  937. * @param Periphs This parameter can be a combination of the following values:
  938. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  939. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  940. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  941. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  942. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  943. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  944. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  945. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  946. *
  947. * (*) value not defined in all devices.
  948. * @retval None
  949. */
  950. __STATIC_INLINE void LL_AHB1_GRP1_ReleaseReset(uint32_t Periphs)
  951. {
  952. CLEAR_BIT(RCC->AHB1RSTR, Periphs);
  953. }
  954. /**
  955. * @brief Enable AHB1 peripherals clock during Low Power (Sleep) mode.
  956. * @rmtoll AHB1LPENR DMA1LPEN LL_AHB1_GRP1_EnableClockSleep\n
  957. * AHB1LPENR DMA2LPEN LL_AHB1_GRP1_EnableClockSleep\n
  958. * AHB1LPENR ADC12LPEN LL_AHB1_GRP1_EnableClockSleep\n
  959. * AHB1LPENR ARTLPEN LL_AHB1_GRP1_EnableClockSleep\n (*)
  960. * AHB1LPENR CRCLPEN LL_AHB1_GRP1_EnableClockSleep\n (*)
  961. * AHB1LPENR ETH1MACLPEN LL_AHB1_GRP1_EnableClockSleep\n (*)
  962. * AHB1LPENR ETH1TXLPEN LL_AHB1_GRP1_EnableClockSleep\n (*)
  963. * AHB1LPENR ETH1RXLPEN LL_AHB1_GRP1_EnableClockSleep\n
  964. * AHB1LPENR USB1OTGHSLPEN LL_AHB1_GRP1_EnableClockSleep\n
  965. * AHB1LPENR USB1OTGHSULPILPEN LL_AHB1_GRP1_EnableClockSleep\n
  966. * AHB1LPENR USB2OTGHSLPEN LL_AHB1_GRP1_EnableClockSleep\n (*)
  967. * AHB1LPENR USB2OTGHSULPILPEN LL_AHB1_GRP1_EnableClockSleep (*)
  968. * @param Periphs This parameter can be a combination of the following values:
  969. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  970. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  971. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  972. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  973. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  974. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  975. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  976. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  977. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  978. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  979. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  980. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  981. *
  982. * (*) value not defined in all devices.
  983. * @retval None
  984. */
  985. __STATIC_INLINE void LL_AHB1_GRP1_EnableClockSleep(uint32_t Periphs)
  986. {
  987. __IO uint32_t tmpreg;
  988. SET_BIT(RCC->AHB1LPENR, Periphs);
  989. /* Delay after an RCC peripheral clock enabling */
  990. tmpreg = READ_BIT(RCC->AHB1LPENR, Periphs);
  991. (void)tmpreg;
  992. }
  993. /**
  994. * @brief Disable AHB1 peripherals clock during Low Power (Sleep) mode.
  995. * @rmtoll AHB1LPENR DMA1LPEN LL_AHB1_GRP1_DisableClockSleep\n
  996. * AHB1LPENR DMA2LPEN LL_AHB1_GRP1_DisableClockSleep\n
  997. * AHB1LPENR ADC12LPEN LL_AHB1_GRP1_DisableClockSleep\n
  998. * AHB1LPENR ARTLPEN LL_AHB1_GRP1_DisableClockSleep\n (*)
  999. * AHB1LPENR CRCLPEN LL_AHB1_GRP1_DisableClockSleep\n (*)
  1000. * AHB1LPENR ETH1MACLPEN LL_AHB1_GRP1_DisableClockSleep\n (*)
  1001. * AHB1LPENR ETH1TXLPEN LL_AHB1_GRP1_DisableClockSleep\n (*)
  1002. * AHB1LPENR ETH1RXLPEN LL_AHB1_GRP1_DisableClockSleep\n (*)
  1003. * AHB1LPENR USB1OTGHSLPEN LL_AHB1_GRP1_DisableClockSleep\n
  1004. * AHB1LPENR USB1OTGHSULPILPEN LL_AHB1_GRP1_DisableClockSleep\n
  1005. * AHB1LPENR USB2OTGHSLPEN LL_AHB1_GRP1_DisableClockSleep\n (*)
  1006. * AHB1LPENR USB2OTGHSULPILPEN LL_AHB1_GRP1_DisableClockSleep (*)
  1007. * @param Periphs This parameter can be a combination of the following values:
  1008. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  1009. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  1010. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  1011. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  1012. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  1013. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  1014. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  1015. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  1016. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  1017. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  1018. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  1019. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  1020. *
  1021. * (*) value not defined in all devices.
  1022. * @retval None
  1023. */
  1024. __STATIC_INLINE void LL_AHB1_GRP1_DisableClockSleep(uint32_t Periphs)
  1025. {
  1026. CLEAR_BIT(RCC->AHB1LPENR, Periphs);
  1027. }
  1028. /**
  1029. * @}
  1030. */
  1031. /** @defgroup BUS_LL_EF_AHB2 AHB2
  1032. * @{
  1033. */
  1034. /**
  1035. * @brief Enable AHB2 peripherals clock.
  1036. * @rmtoll AHB2ENR DCMIEN LL_AHB2_GRP1_EnableClock\n
  1037. * AHB2ENR HSEMEN LL_AHB2_GRP1_EnableClock\n (*)
  1038. * AHB2ENR CRYPEN LL_AHB2_GRP1_EnableClock\n (*)
  1039. * AHB2ENR HASHEN LL_AHB2_GRP1_EnableClock\n (*)
  1040. * AHB2ENR RNGEN LL_AHB2_GRP1_EnableClock\n
  1041. * AHB2ENR SDMMC2EN LL_AHB2_GRP1_EnableClock\n
  1042. * AHB2ENR BDMA1EN LL_AHB2_GRP1_EnableClock\n (*)
  1043. * AHB2ENR FMACEN LL_AHB2_GRP1_EnableClock\n
  1044. * AHB2ENR CORDICEN LL_AHB2_GRP1_EnableClock\n
  1045. * AHB2ENR D2SRAM1EN LL_AHB2_GRP1_EnableClock\n
  1046. * AHB2ENR D2SRAM2EN LL_AHB2_GRP1_EnableClock\n
  1047. * AHB2ENR D2SRAM3EN LL_AHB2_GRP1_EnableClock (*)
  1048. * @param Periphs This parameter can be a combination of the following values:
  1049. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  1050. * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*)
  1051. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  1052. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  1053. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  1054. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  1055. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  1056. * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*)
  1057. * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*)
  1058. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  1059. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  1060. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  1061. *
  1062. * (*) value not defined in all devices.
  1063. * @retval None
  1064. */
  1065. __STATIC_INLINE void LL_AHB2_GRP1_EnableClock(uint32_t Periphs)
  1066. {
  1067. __IO uint32_t tmpreg;
  1068. SET_BIT(RCC->AHB2ENR, Periphs);
  1069. /* Delay after an RCC peripheral clock enabling */
  1070. tmpreg = READ_BIT(RCC->AHB2ENR, Periphs);
  1071. (void)tmpreg;
  1072. }
  1073. /**
  1074. * @brief Check if AHB2 peripheral clock is enabled or not
  1075. * @rmtoll AHB2ENR DCMIEN LL_AHB2_GRP1_IsEnabledClock\n
  1076. * AHB2ENR HSEMEN LL_AHB2_GRP1_IsEnabledClock\n (*)
  1077. * AHB2ENR CRYPEN LL_AHB2_GRP1_IsEnabledClock\n (*)
  1078. * AHB2ENR HASHEN LL_AHB2_GRP1_IsEnabledClock\n (*)
  1079. * AHB2ENR RNGEN LL_AHB2_GRP1_IsEnabledClock\n
  1080. * AHB2ENR SDMMC2EN LL_AHB2_GRP1_IsEnabledClock\n
  1081. * AHB2ENR BDMA1EN LL_AHB2_GRP1_IsEnabledClock\n (*)
  1082. * AHB2ENR FMACEN LL_AHB2_GRP1_IsEnabledClock\n
  1083. * AHB2ENR CORDICEN LL_AHB2_GRP1_IsEnabledClock\n
  1084. * AHB2ENR D2SRAM1EN LL_AHB2_GRP1_IsEnabledClock\n
  1085. * AHB2ENR D2SRAM2EN LL_AHB2_GRP1_IsEnabledClock\n
  1086. * AHB2ENR D2SRAM3EN LL_AHB2_GRP1_IsEnabledClock (*)
  1087. * @param Periphs This parameter can be a combination of the following values:
  1088. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  1089. * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*)
  1090. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  1091. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  1092. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  1093. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  1094. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  1095. * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*)
  1096. * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*)
  1097. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  1098. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  1099. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  1100. *
  1101. * (*) value not defined in all devices.
  1102. * @retval uint32_t
  1103. */
  1104. __STATIC_INLINE uint32_t LL_AHB2_GRP1_IsEnabledClock(uint32_t Periphs)
  1105. {
  1106. return ((READ_BIT(RCC->AHB2ENR, Periphs) == Periphs) ? 1U : 0U);
  1107. }
  1108. /**
  1109. * @brief Disable AHB2 peripherals clock.
  1110. * @rmtoll AHB2ENR DCMIEN LL_AHB2_GRP1_DisableClock\n
  1111. * AHB2ENR HSEMEN LL_AHB2_GRP1_DisableClock\n (*)
  1112. * AHB2ENR CRYPEN LL_AHB2_GRP1_DisableClock\n (*)
  1113. * AHB2ENR HASHEN LL_AHB2_GRP1_DisableClock\n (*)
  1114. * AHB2ENR RNGEN LL_AHB2_GRP1_DisableClock\n
  1115. * AHB2ENR SDMMC2EN LL_AHB2_GRP1_DisableClock\n
  1116. * AHB2ENR BDMA1EN LL_AHB2_GRP1_DisableClock\n (*)
  1117. * AHB2ENR FMACEN LL_AHB2_GRP1_DisableClock\n
  1118. * AHB2ENR CORDICEN LL_AHB2_GRP1_DisableClock\n
  1119. * AHB2ENR D2SRAM1EN LL_AHB2_GRP1_DisableClock\n
  1120. * AHB2ENR D2SRAM2EN LL_AHB2_GRP1_DisableClock\n
  1121. * AHB2ENR D2SRAM3EN LL_AHB2_GRP1_DisableClock (*)
  1122. * @param Periphs This parameter can be a combination of the following values:
  1123. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  1124. * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*)
  1125. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  1126. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  1127. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  1128. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  1129. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  1130. * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*)
  1131. * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*)
  1132. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  1133. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  1134. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  1135. *
  1136. * (*) value not defined in all devices.
  1137. * @retval None
  1138. */
  1139. __STATIC_INLINE void LL_AHB2_GRP1_DisableClock(uint32_t Periphs)
  1140. {
  1141. CLEAR_BIT(RCC->AHB2ENR, Periphs);
  1142. }
  1143. /**
  1144. * @brief Force AHB2 peripherals reset.
  1145. * @rmtoll AHB2RSTR DCMIRST LL_AHB2_GRP1_ForceReset\n
  1146. * AHB2RSTR HSEMRST LL_AHB2_GRP1_ForceReset\n (*)
  1147. * AHB2RSTR CRYPRST LL_AHB2_GRP1_ForceReset\n (*)
  1148. * AHB2RSTR HASHRST LL_AHB2_GRP1_ForceReset\n (*)
  1149. * AHB2RSTR RNGRST LL_AHB2_GRP1_ForceReset\n
  1150. * AHB2RSTR SDMMC2RST LL_AHB2_GRP1_ForceReset\n
  1151. * AHB2RSTR BDMA1RST LL_AHB2_GRP1_ForceReset\n (*)
  1152. * AHB2RSTR FMACRST LL_AHB2_GRP1_ForceReset\n
  1153. * AHB2RSTR CORDICRST LL_AHB2_GRP1_ForceReset
  1154. * @param Periphs This parameter can be a combination of the following values:
  1155. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  1156. * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*)
  1157. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  1158. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  1159. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  1160. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  1161. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  1162. * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*)
  1163. * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*)
  1164. *
  1165. * (*) value not defined in all devices.
  1166. * @retval None
  1167. */
  1168. __STATIC_INLINE void LL_AHB2_GRP1_ForceReset(uint32_t Periphs)
  1169. {
  1170. SET_BIT(RCC->AHB2RSTR, Periphs);
  1171. }
  1172. /**
  1173. * @brief Release AHB2 peripherals reset.
  1174. * @rmtoll AHB2RSTR DCMIRST LL_AHB2_GRP1_ReleaseReset\n
  1175. * AHB2RSTR HSEMRST LL_AHB2_GRP1_ReleaseReset\n (*)
  1176. * AHB2RSTR CRYPRST LL_AHB2_GRP1_ReleaseReset\n (*)
  1177. * AHB2RSTR HASHRST LL_AHB2_GRP1_ReleaseReset\n (*)
  1178. * AHB2RSTR RNGRST LL_AHB2_GRP1_ReleaseReset\n
  1179. * AHB2RSTR SDMMC2RST LL_AHB2_GRP1_ReleaseReset\n
  1180. * AHB2RSTR BDMA1RST LL_AHB2_GRP1_ReleaseReset\n (*)
  1181. * AHB2RSTR FMACRST LL_AHB2_GRP1_ReleaseReset\n
  1182. * AHB2RSTR CORDICRST LL_AHB2_GRP1_ReleaseReset
  1183. * @param Periphs This parameter can be a combination of the following values:
  1184. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  1185. * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*)
  1186. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  1187. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  1188. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  1189. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  1190. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  1191. * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*)
  1192. * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*)
  1193. *
  1194. * (*) value not defined in all devices.
  1195. * @retval None
  1196. */
  1197. __STATIC_INLINE void LL_AHB2_GRP1_ReleaseReset(uint32_t Periphs)
  1198. {
  1199. CLEAR_BIT(RCC->AHB2RSTR, Periphs);
  1200. }
  1201. /**
  1202. * @brief Enable AHB2 peripherals clock during Low Power (Sleep) mode.
  1203. * @rmtoll AHB2LPENR DCMILPEN LL_AHB2_GRP1_EnableClockSleep\n
  1204. * AHB2LPENR CRYPLPEN LL_AHB2_GRP1_EnableClockSleep\n (*)
  1205. * AHB2LPENR HASHLPEN LL_AHB2_GRP1_EnableClockSleep\n (*)
  1206. * AHB2LPENR RNGLPEN LL_AHB2_GRP1_EnableClockSleep\n
  1207. * AHB2LPENR SDMMC2LPEN LL_AHB2_GRP1_EnableClockSleep\n
  1208. * AHB2LPENR BDMA1LPEN LL_AHB2_GRP1_EnableClockSleep\n (*)
  1209. * AHB2LPENR FMACLPEN LL_AHB2_GRP1_EnableClockSleep\n
  1210. * AHB2LPENR CORDICLPEN LL_AHB2_GRP1_EnableClockSleep\n
  1211. * AHB2LPENR D2SRAM1LPEN LL_AHB2_GRP1_EnableClockSleep\n
  1212. * AHB2LPENR D2SRAM2LPEN LL_AHB2_GRP1_EnableClockSleep\n
  1213. * AHB2LPENR D2SRAM3LPEN LL_AHB2_GRP1_EnableClockSleep (*)
  1214. * @param Periphs This parameter can be a combination of the following values:
  1215. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  1216. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  1217. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  1218. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  1219. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  1220. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  1221. * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*)
  1222. * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*)
  1223. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  1224. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  1225. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  1226. *
  1227. * (*) value not defined in all devices.
  1228. * @retval None
  1229. */
  1230. __STATIC_INLINE void LL_AHB2_GRP1_EnableClockSleep(uint32_t Periphs)
  1231. {
  1232. __IO uint32_t tmpreg;
  1233. SET_BIT(RCC->AHB2LPENR, Periphs);
  1234. /* Delay after an RCC peripheral clock enabling */
  1235. tmpreg = READ_BIT(RCC->AHB2LPENR, Periphs);
  1236. (void)tmpreg;
  1237. }
  1238. /**
  1239. * @brief Disable AHB2 peripherals clock during Low Power (Sleep) mode.
  1240. * @rmtoll AHB2LPENR DCMILPEN LL_AHB2_GRP1_DisableClockSleep\n
  1241. * AHB2LPENR CRYPLPEN LL_AHB2_GRP1_DisableClockSleep\n (*)
  1242. * AHB2LPENR HASHLPEN LL_AHB2_GRP1_DisableClockSleep\n (*)
  1243. * AHB2LPENR RNGLPEN LL_AHB2_GRP1_DisableClockSleep\n
  1244. * AHB2LPENR SDMMC2LPEN LL_AHB2_GRP1_DisableClockSleep\n
  1245. * AHB2LPENR BDMA1LPEN LL_AHB2_GRP1_DisableClockSleep\n (*)
  1246. * AHB2LPENR D2SRAM1LPEN LL_AHB2_GRP1_DisableClockSleep\n
  1247. * AHB2LPENR D2SRAM2LPEN LL_AHB2_GRP1_DisableClockSleep\n
  1248. * AHB2LPENR D2SRAM3LPEN LL_AHB2_GRP1_DisableClockSleep (*)
  1249. * @param Periphs This parameter can be a combination of the following values:
  1250. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  1251. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  1252. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  1253. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  1254. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  1255. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  1256. * @arg @ref LL_AHB2_GRP1_PERIPH_FMAC (*)
  1257. * @arg @ref LL_AHB2_GRP1_PERIPH_CORDIC (*)
  1258. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  1259. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  1260. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  1261. *
  1262. * (*) value not defined in all devices.
  1263. * @retval None
  1264. */
  1265. __STATIC_INLINE void LL_AHB2_GRP1_DisableClockSleep(uint32_t Periphs)
  1266. {
  1267. CLEAR_BIT(RCC->AHB2LPENR, Periphs);
  1268. }
  1269. /**
  1270. * @}
  1271. */
  1272. /** @defgroup BUS_LL_EF_AHB4 AHB4
  1273. * @{
  1274. */
  1275. /**
  1276. * @brief Enable AHB4 peripherals clock.
  1277. * @rmtoll AHB4ENR GPIOAEN LL_AHB4_GRP1_EnableClock\n
  1278. * AHB4ENR GPIOBEN LL_AHB4_GRP1_EnableClock\n
  1279. * AHB4ENR GPIOCEN LL_AHB4_GRP1_EnableClock\n
  1280. * AHB4ENR GPIODEN LL_AHB4_GRP1_EnableClock\n
  1281. * AHB4ENR GPIOEEN LL_AHB4_GRP1_EnableClock\n
  1282. * AHB4ENR GPIOFEN LL_AHB4_GRP1_EnableClock\n
  1283. * AHB4ENR GPIOGEN LL_AHB4_GRP1_EnableClock\n
  1284. * AHB4ENR GPIOHEN LL_AHB4_GRP1_EnableClock\n
  1285. * AHB4ENR GPIOIEN LL_AHB4_GRP1_EnableClock\n (*)
  1286. * AHB4ENR GPIOJEN LL_AHB4_GRP1_EnableClock\n
  1287. * AHB4ENR GPIOKEN LL_AHB4_GRP1_EnableClock\n
  1288. * AHB4ENR CRCEN LL_AHB4_GRP1_EnableClock\n (*)
  1289. * AHB4ENR BDMAEN LL_AHB4_GRP1_EnableClock\n
  1290. * AHB4ENR ADC3EN LL_AHB4_GRP1_EnableClock\n (*)
  1291. * AHB4ENR HSEMEN LL_AHB4_GRP1_EnableClock\n (*)
  1292. * AHB4ENR BKPRAMEN LL_AHB4_GRP1_EnableClock\n
  1293. * AHB4ENR SRAM4EN LL_AHB4_GRP1_EnableClock
  1294. * @param Periphs This parameter can be a combination of the following values:
  1295. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  1296. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  1297. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  1298. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  1299. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  1300. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  1301. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  1302. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  1303. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  1304. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  1305. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  1306. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  1307. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  1308. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  1309. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  1310. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  1311. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  1312. *
  1313. * (*) value not defined in all devices.
  1314. * @retval None
  1315. */
  1316. __STATIC_INLINE void LL_AHB4_GRP1_EnableClock(uint32_t Periphs)
  1317. {
  1318. __IO uint32_t tmpreg;
  1319. SET_BIT(RCC->AHB4ENR, Periphs);
  1320. /* Delay after an RCC peripheral clock enabling */
  1321. tmpreg = READ_BIT(RCC->AHB4ENR, Periphs);
  1322. (void)tmpreg;
  1323. }
  1324. /**
  1325. * @brief Check if AHB4 peripheral clock is enabled or not
  1326. * @rmtoll AHB4ENR GPIOAEN LL_AHB4_GRP1_IsEnabledClock\n
  1327. * AHB4ENR GPIOBEN LL_AHB4_GRP1_IsEnabledClock\n
  1328. * AHB4ENR GPIOCEN LL_AHB4_GRP1_IsEnabledClock\n
  1329. * AHB4ENR GPIODEN LL_AHB4_GRP1_IsEnabledClock\n
  1330. * AHB4ENR GPIOEEN LL_AHB4_GRP1_IsEnabledClock\n
  1331. * AHB4ENR GPIOFEN LL_AHB4_GRP1_IsEnabledClock\n
  1332. * AHB4ENR GPIOGEN LL_AHB4_GRP1_IsEnabledClock\n
  1333. * AHB4ENR GPIOHEN LL_AHB4_GRP1_IsEnabledClock\n
  1334. * AHB4ENR GPIOIEN LL_AHB4_GRP1_IsEnabledClock\n (*)
  1335. * AHB4ENR GPIOJEN LL_AHB4_GRP1_IsEnabledClock\n
  1336. * AHB4ENR GPIOKEN LL_AHB4_GRP1_IsEnabledClock\n
  1337. * AHB4ENR CRCEN LL_AHB4_GRP1_IsEnabledClock\n (*)
  1338. * AHB4ENR BDMAEN LL_AHB4_GRP1_IsEnabledClock\n
  1339. * AHB4ENR ADC3EN LL_AHB4_GRP1_IsEnabledClock\n (*)
  1340. * AHB4ENR HSEMEN LL_AHB4_GRP1_IsEnabledClock\n (*)
  1341. * AHB4ENR BKPRAMEN LL_AHB4_GRP1_IsEnabledClock\n
  1342. * AHB4ENR SRAM4EN LL_AHB4_GRP1_IsEnabledClock
  1343. * @param Periphs This parameter can be a combination of the following values:
  1344. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  1345. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  1346. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  1347. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  1348. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  1349. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  1350. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  1351. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  1352. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  1353. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  1354. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  1355. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  1356. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  1357. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  1358. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  1359. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  1360. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  1361. *
  1362. * (*) value not defined in all devices.
  1363. * @retval uint32_t
  1364. */
  1365. __STATIC_INLINE uint32_t LL_AHB4_GRP1_IsEnabledClock(uint32_t Periphs)
  1366. {
  1367. return ((READ_BIT(RCC->AHB4ENR, Periphs) == Periphs) ? 1U : 0U);
  1368. }
  1369. /**
  1370. * @brief Disable AHB4 peripherals clock.
  1371. * @rmtoll AHB4ENR GPIOAEN LL_AHB4_GRP1_DisableClock\n
  1372. * AHB4ENR GPIOBEN LL_AHB4_GRP1_DisableClock\n
  1373. * AHB4ENR GPIOCEN LL_AHB4_GRP1_DisableClock\n
  1374. * AHB4ENR GPIODEN LL_AHB4_GRP1_DisableClock\n
  1375. * AHB4ENR GPIOEEN LL_AHB4_GRP1_DisableClock\n
  1376. * AHB4ENR GPIOFEN LL_AHB4_GRP1_DisableClock\n
  1377. * AHB4ENR GPIOGEN LL_AHB4_GRP1_DisableClock\n
  1378. * AHB4ENR GPIOHEN LL_AHB4_GRP1_DisableClock\n
  1379. * AHB4ENR GPIOIEN LL_AHB4_GRP1_DisableClock\n (*)
  1380. * AHB4ENR GPIOJEN LL_AHB4_GRP1_DisableClock\n
  1381. * AHB4ENR GPIOKEN LL_AHB4_GRP1_DisableClock\n
  1382. * AHB4ENR CRCEN LL_AHB4_GRP1_DisableClock\n (*)
  1383. * AHB4ENR BDMAEN LL_AHB4_GRP1_DisableClock\n
  1384. * AHB4ENR ADC3EN LL_AHB4_GRP1_DisableClock\n (*)
  1385. * AHB4ENR HSEMEN LL_AHB4_GRP1_DisableClock\n (*)
  1386. * AHB4ENR BKPRAMEN LL_AHB4_GRP1_DisableClock\n
  1387. * AHB4ENR SRAM4EN LL_AHB4_GRP1_DisableClock
  1388. * @param Periphs This parameter can be a combination of the following values:
  1389. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  1390. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  1391. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  1392. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  1393. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  1394. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  1395. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  1396. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  1397. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  1398. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  1399. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  1400. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  1401. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  1402. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  1403. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  1404. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  1405. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  1406. *
  1407. * (*) value not defined in all devices.
  1408. * @retval None
  1409. */
  1410. __STATIC_INLINE void LL_AHB4_GRP1_DisableClock(uint32_t Periphs)
  1411. {
  1412. CLEAR_BIT(RCC->AHB4ENR, Periphs);
  1413. }
  1414. /**
  1415. * @brief Force AHB4 peripherals reset.
  1416. * @rmtoll AHB4RSTR GPIOARST LL_AHB4_GRP1_ForceReset\n
  1417. * AHB4RSTR GPIOBRST LL_AHB4_GRP1_ForceReset\n
  1418. * AHB4RSTR GPIOCRST LL_AHB4_GRP1_ForceReset\n
  1419. * AHB4RSTR GPIODRST LL_AHB4_GRP1_ForceReset\n
  1420. * AHB4RSTR GPIOERST LL_AHB4_GRP1_ForceReset\n
  1421. * AHB4RSTR GPIOFRST LL_AHB4_GRP1_ForceReset\n
  1422. * AHB4RSTR GPIOGRST LL_AHB4_GRP1_ForceReset\n
  1423. * AHB4RSTR GPIOHRST LL_AHB4_GRP1_ForceReset\n
  1424. * AHB4RSTR GPIOIRST LL_AHB4_GRP1_ForceReset\n (*)
  1425. * AHB4RSTR GPIOJRST LL_AHB4_GRP1_ForceReset\n
  1426. * AHB4RSTR GPIOKRST LL_AHB4_GRP1_ForceReset\n
  1427. * AHB4RSTR CRCRST LL_AHB4_GRP1_ForceReset\n (*)
  1428. * AHB4RSTR BDMARST LL_AHB4_GRP1_ForceReset\n
  1429. * AHB4RSTR ADC3RST LL_AHB4_GRP1_ForceReset\n (*)
  1430. * AHB4RSTR HSEMRST LL_AHB4_GRP1_ForceReset (*)
  1431. * @param Periphs This parameter can be a combination of the following values:
  1432. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  1433. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  1434. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  1435. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  1436. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  1437. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  1438. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  1439. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  1440. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  1441. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  1442. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  1443. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  1444. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  1445. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  1446. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  1447. *
  1448. * (*) value not defined in all devices.
  1449. * @retval None
  1450. */
  1451. __STATIC_INLINE void LL_AHB4_GRP1_ForceReset(uint32_t Periphs)
  1452. {
  1453. SET_BIT(RCC->AHB4RSTR, Periphs);
  1454. }
  1455. /**
  1456. * @brief Release AHB4 peripherals reset.
  1457. * @rmtoll AHB4RSTR GPIOARST LL_AHB4_GRP1_ReleaseReset\n
  1458. * AHB4RSTR GPIOBRST LL_AHB4_GRP1_ReleaseReset\n
  1459. * AHB4RSTR GPIOCRST LL_AHB4_GRP1_ReleaseReset\n
  1460. * AHB4RSTR GPIODRST LL_AHB4_GRP1_ReleaseReset\n
  1461. * AHB4RSTR GPIOERST LL_AHB4_GRP1_ReleaseReset\n
  1462. * AHB4RSTR GPIOFRST LL_AHB4_GRP1_ReleaseReset\n
  1463. * AHB4RSTR GPIOGRST LL_AHB4_GRP1_ReleaseReset\n
  1464. * AHB4RSTR GPIOHRST LL_AHB4_GRP1_ReleaseReset\n
  1465. * AHB4RSTR GPIOIRST LL_AHB4_GRP1_ReleaseReset\n (*)
  1466. * AHB4RSTR GPIOJRST LL_AHB4_GRP1_ReleaseReset\n
  1467. * AHB4RSTR GPIOKRST LL_AHB4_GRP1_ReleaseReset\n
  1468. * AHB4RSTR CRCRST LL_AHB4_GRP1_ReleaseReset\n (*)
  1469. * AHB4RSTR BDMARST LL_AHB4_GRP1_ReleaseReset\n
  1470. * AHB4RSTR ADC3RST LL_AHB4_GRP1_ReleaseReset\n (*)
  1471. * AHB4RSTR HSEMRST LL_AHB4_GRP1_ReleaseReset (*)
  1472. * @param Periphs This parameter can be a combination of the following values:
  1473. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  1474. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  1475. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  1476. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  1477. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  1478. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  1479. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  1480. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  1481. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  1482. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  1483. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  1484. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  1485. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  1486. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  1487. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  1488. *
  1489. * (*) value not defined in all devices.
  1490. * @retval None
  1491. */
  1492. __STATIC_INLINE void LL_AHB4_GRP1_ReleaseReset(uint32_t Periphs)
  1493. {
  1494. CLEAR_BIT(RCC->AHB4RSTR, Periphs);
  1495. }
  1496. /**
  1497. * @brief Enable AHB4 peripherals clock during Low Power (Sleep) mode.
  1498. * @rmtoll AHB4LPENR GPIOALPEN LL_AHB4_GRP1_EnableClockSleep\n
  1499. * AHB4LPENR GPIOBLPEN LL_AHB4_GRP1_EnableClockSleep\n
  1500. * AHB4LPENR GPIOCLPEN LL_AHB4_GRP1_EnableClockSleep\n
  1501. * AHB4LPENR GPIODLPEN LL_AHB4_GRP1_EnableClockSleep\n
  1502. * AHB4LPENR GPIOELPEN LL_AHB4_GRP1_EnableClockSleep\n
  1503. * AHB4LPENR GPIOFLPEN LL_AHB4_GRP1_EnableClockSleep\n
  1504. * AHB4LPENR GPIOGLPEN LL_AHB4_GRP1_EnableClockSleep\n
  1505. * AHB4LPENR GPIOHLPEN LL_AHB4_GRP1_EnableClockSleep\n
  1506. * AHB4LPENR GPIOILPEN LL_AHB4_GRP1_EnableClockSleep\n (*)
  1507. * AHB4LPENR GPIOJLPEN LL_AHB4_GRP1_EnableClockSleep\n
  1508. * AHB4LPENR GPIOKLPEN LL_AHB4_GRP1_EnableClockSleep\n
  1509. * AHB4LPENR CRCLPEN LL_AHB4_GRP1_EnableClockSleep\n (*)
  1510. * AHB4LPENR BDMALPEN LL_AHB4_GRP1_EnableClockSleep\n
  1511. * AHB4LPENR ADC3LPEN LL_AHB4_GRP1_EnableClockSleep\n (*)
  1512. * AHB4LPENR BKPRAMLPEN LL_AHB4_GRP1_EnableClockSleep\n
  1513. * AHB4LPENR SRAM4LPEN LL_AHB4_GRP1_EnableClockSleep
  1514. * @param Periphs This parameter can be a combination of the following values:
  1515. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  1516. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  1517. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  1518. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  1519. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  1520. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  1521. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  1522. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  1523. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  1524. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  1525. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  1526. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  1527. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  1528. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  1529. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  1530. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  1531. * @retval None
  1532. */
  1533. __STATIC_INLINE void LL_AHB4_GRP1_EnableClockSleep(uint32_t Periphs)
  1534. {
  1535. __IO uint32_t tmpreg;
  1536. SET_BIT(RCC->AHB4LPENR, Periphs);
  1537. /* Delay after an RCC peripheral clock enabling */
  1538. tmpreg = READ_BIT(RCC->AHB4LPENR, Periphs);
  1539. (void)tmpreg;
  1540. }
  1541. /**
  1542. * @brief Disable AHB4 peripherals clock during Low Power (Sleep) mode.
  1543. * @rmtoll AHB4LPENR GPIOALPEN LL_AHB4_GRP1_DisableClockSleep\n
  1544. * AHB4LPENR GPIOBLPEN LL_AHB4_GRP1_DisableClockSleep\n
  1545. * AHB4LPENR GPIOCLPEN LL_AHB4_GRP1_DisableClockSleep\n
  1546. * AHB4LPENR GPIODLPEN LL_AHB4_GRP1_DisableClockSleep\n
  1547. * AHB4LPENR GPIOELPEN LL_AHB4_GRP1_DisableClockSleep\n
  1548. * AHB4LPENR GPIOFLPEN LL_AHB4_GRP1_DisableClockSleep\n
  1549. * AHB4LPENR GPIOGLPEN LL_AHB4_GRP1_DisableClockSleep\n
  1550. * AHB4LPENR GPIOHLPEN LL_AHB4_GRP1_DisableClockSleep\n
  1551. * AHB4LPENR GPIOILPEN LL_AHB4_GRP1_DisableClockSleep\n (*)
  1552. * AHB4LPENR GPIOJLPEN LL_AHB4_GRP1_DisableClockSleep\n
  1553. * AHB4LPENR GPIOKLPEN LL_AHB4_GRP1_DisableClockSleep\n
  1554. * AHB4LPENR CRCLPEN LL_AHB4_GRP1_DisableClockSleep\n (*)
  1555. * AHB4LPENR BDMALPEN LL_AHB4_GRP1_DisableClockSleep\n
  1556. * AHB4LPENR ADC3LPEN LL_AHB4_GRP1_DisableClockSleep\n (*)
  1557. * AHB4LPENR BKPRAMLPEN LL_AHB4_GRP1_DisableClockSleep\n
  1558. * AHB4LPENR SRAM4LPEN LL_AHB4_GRP1_DisableClockSleep
  1559. * @param Periphs This parameter can be a combination of the following values:
  1560. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  1561. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  1562. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  1563. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  1564. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  1565. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  1566. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  1567. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  1568. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  1569. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  1570. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  1571. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  1572. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  1573. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  1574. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  1575. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  1576. * @retval None
  1577. */
  1578. __STATIC_INLINE void LL_AHB4_GRP1_DisableClockSleep(uint32_t Periphs)
  1579. {
  1580. CLEAR_BIT(RCC->AHB4LPENR, Periphs);
  1581. }
  1582. /**
  1583. * @}
  1584. */
  1585. /** @defgroup BUS_LL_EF_APB3 APB3
  1586. * @{
  1587. */
  1588. /**
  1589. * @brief Enable APB3 peripherals clock.
  1590. * @rmtoll APB3ENR LTDCEN LL_APB3_GRP1_EnableClock\n (*)
  1591. * APB3ENR DSIEN LL_APB3_GRP1_EnableClock\n (*)
  1592. * APB3ENR WWDG1EN LL_APB3_GRP1_EnableClock
  1593. * @param Periphs This parameter can be a combination of the following values:
  1594. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  1595. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  1596. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  1597. *
  1598. * (*) value not defined in all devices.
  1599. * @retval None
  1600. */
  1601. __STATIC_INLINE void LL_APB3_GRP1_EnableClock(uint32_t Periphs)
  1602. {
  1603. __IO uint32_t tmpreg;
  1604. SET_BIT(RCC->APB3ENR, Periphs);
  1605. /* Delay after an RCC peripheral clock enabling */
  1606. tmpreg = READ_BIT(RCC->APB3ENR, Periphs);
  1607. (void)tmpreg;
  1608. }
  1609. /**
  1610. * @brief Check if APB3 peripheral clock is enabled or not
  1611. * @rmtoll APB3ENR LTDCEN LL_APB3_GRP1_IsEnabledClock\n (*)
  1612. * APB3ENR DSIEN LL_APB3_GRP1_IsEnabledClock\n (*)
  1613. * APB3ENR WWDG1EN LL_APB3_GRP1_IsEnabledClock
  1614. * @param Periphs This parameter can be a combination of the following values:
  1615. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  1616. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  1617. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  1618. *
  1619. * (*) value not defined in all devices.
  1620. * @retval uint32_t
  1621. */
  1622. __STATIC_INLINE uint32_t LL_APB3_GRP1_IsEnabledClock(uint32_t Periphs)
  1623. {
  1624. return ((READ_BIT(RCC->APB3ENR, Periphs) == Periphs) ? 1U : 0U);
  1625. }
  1626. /**
  1627. * @brief Disable APB3 peripherals clock.
  1628. * @rmtoll APB3ENR LTDCEN LL_APB3_GRP1_DisableClock\n
  1629. * APB3ENR DSIEN LL_APB3_GRP1_DisableClock\n
  1630. * APB3ENR WWDG1EN LL_APB3_GRP1_DisableClock
  1631. * @param Periphs This parameter can be a combination of the following values:
  1632. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  1633. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  1634. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  1635. *
  1636. * (*) value not defined in all devices.
  1637. * @retval None
  1638. */
  1639. __STATIC_INLINE void LL_APB3_GRP1_DisableClock(uint32_t Periphs)
  1640. {
  1641. CLEAR_BIT(RCC->APB3ENR, Periphs);
  1642. }
  1643. /**
  1644. * @brief Force APB3 peripherals reset.
  1645. * @rmtoll APB3RSTR LTDCRST LL_APB3_GRP1_ForceReset\n (*)
  1646. * APB3RSTR DSIRST LL_APB3_GRP1_ForceReset (*)
  1647. * @param Periphs This parameter can be a combination of the following values:
  1648. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  1649. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  1650. *
  1651. * (*) value not defined in all devices.
  1652. * @retval None
  1653. */
  1654. __STATIC_INLINE void LL_APB3_GRP1_ForceReset(uint32_t Periphs)
  1655. {
  1656. SET_BIT(RCC->APB3RSTR, Periphs);
  1657. }
  1658. /**
  1659. * @brief Release APB3 peripherals reset.
  1660. * @rmtoll APB3RSTR LTDCRST LL_APB3_GRP1_ReleaseReset\n
  1661. * APB3RSTR DSIRST LL_APB3_GRP1_ReleaseReset
  1662. * @param Periphs This parameter can be a combination of the following values:
  1663. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  1664. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  1665. *
  1666. * (*) value not defined in all devices.
  1667. * @retval None
  1668. */
  1669. __STATIC_INLINE void LL_APB3_GRP1_ReleaseReset(uint32_t Periphs)
  1670. {
  1671. CLEAR_BIT(RCC->APB3RSTR, Periphs);
  1672. }
  1673. /**
  1674. * @brief Enable APB3 peripherals clock during Low Power (Sleep) mode.
  1675. * @rmtoll APB3LPENR LTDCLPEN LL_APB3_GRP1_EnableClockSleep\n (*)
  1676. * APB3LPENR DSILPEN LL_APB3_GRP1_EnableClockSleep\n (*)
  1677. * APB3LPENR WWDG1LPEN LL_APB3_GRP1_EnableClockSleep
  1678. * @param Periphs This parameter can be a combination of the following values:
  1679. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  1680. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  1681. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  1682. *
  1683. * (*) value not defined in all devices.
  1684. * @retval None
  1685. */
  1686. __STATIC_INLINE void LL_APB3_GRP1_EnableClockSleep(uint32_t Periphs)
  1687. {
  1688. __IO uint32_t tmpreg;
  1689. SET_BIT(RCC->APB3LPENR, Periphs);
  1690. /* Delay after an RCC peripheral clock enabling */
  1691. tmpreg = READ_BIT(RCC->APB3LPENR, Periphs);
  1692. (void)tmpreg;
  1693. }
  1694. /**
  1695. * @brief Disable APB3 peripherals clock during Low Power (Sleep) mode.
  1696. * @rmtoll APB3LPENR LTDCLPEN LL_APB3_GRP1_DisableClockSleep\n (*)
  1697. * APB3LPENR DSILPEN LL_APB3_GRP1_DisableClockSleep\n (*)
  1698. * APB3LPENR WWDG1LPEN LL_APB3_GRP1_DisableClockSleep
  1699. * @param Periphs This parameter can be a combination of the following values:
  1700. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  1701. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  1702. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  1703. *
  1704. * (*) value not defined in all devices.
  1705. * @retval None
  1706. */
  1707. __STATIC_INLINE void LL_APB3_GRP1_DisableClockSleep(uint32_t Periphs)
  1708. {
  1709. CLEAR_BIT(RCC->APB3LPENR, Periphs);
  1710. }
  1711. /**
  1712. * @}
  1713. */
  1714. /** @defgroup BUS_LL_EF_APB1 APB1
  1715. * @{
  1716. */
  1717. /**
  1718. * @brief Enable APB1 peripherals clock.
  1719. * @rmtoll APB1LENR TIM2EN LL_APB1_GRP1_EnableClock\n
  1720. * APB1LENR TIM3EN LL_APB1_GRP1_EnableClock\n
  1721. * APB1LENR TIM4EN LL_APB1_GRP1_EnableClock\n
  1722. * APB1LENR TIM5EN LL_APB1_GRP1_EnableClock\n
  1723. * APB1LENR TIM6EN LL_APB1_GRP1_EnableClock\n
  1724. * APB1LENR TIM7EN LL_APB1_GRP1_EnableClock\n
  1725. * APB1LENR TIM12EN LL_APB1_GRP1_EnableClock\n
  1726. * APB1LENR TIM13EN LL_APB1_GRP1_EnableClock\n
  1727. * APB1LENR TIM14EN LL_APB1_GRP1_EnableClock\n
  1728. * APB1LENR LPTIM1EN LL_APB1_GRP1_EnableClock\n
  1729. * APB1LENR WWDG2EN LL_APB1_GRP1_EnableClock\n (*)
  1730. * APB1LENR SPI2EN LL_APB1_GRP1_EnableClock\n
  1731. * APB1LENR SPI3EN LL_APB1_GRP1_EnableClock\n
  1732. * APB1LENR SPDIFRXEN LL_APB1_GRP1_EnableClock\n
  1733. * APB1LENR USART2EN LL_APB1_GRP1_EnableClock\n
  1734. * APB1LENR USART3EN LL_APB1_GRP1_EnableClock\n
  1735. * APB1LENR UART4EN LL_APB1_GRP1_EnableClock\n
  1736. * APB1LENR UART5EN LL_APB1_GRP1_EnableClock\n
  1737. * APB1LENR I2C1EN LL_APB1_GRP1_EnableClock\n
  1738. * APB1LENR I2C2EN LL_APB1_GRP1_EnableClock\n
  1739. * APB1LENR I2C3EN LL_APB1_GRP1_EnableClock\n
  1740. * APB1LENR I2C5EN LL_APB1_GRP1_EnableClock\n (*)
  1741. * APB1LENR CECEN LL_APB1_GRP1_EnableClock\n
  1742. * APB1LENR DAC12EN LL_APB1_GRP1_EnableClock\n
  1743. * APB1LENR UART7EN LL_APB1_GRP1_EnableClock\n
  1744. * APB1LENR UART8EN LL_APB1_GRP1_EnableClock
  1745. * @param Periphs This parameter can be a combination of the following values:
  1746. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  1747. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  1748. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  1749. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  1750. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  1751. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  1752. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  1753. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  1754. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  1755. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  1756. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  1757. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  1758. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  1759. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  1760. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  1761. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  1762. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  1763. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  1764. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  1765. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  1766. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  1767. * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*)
  1768. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  1769. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  1770. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  1771. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  1772. *
  1773. * (*) value not defined in all devices.
  1774. * @retval None
  1775. */
  1776. __STATIC_INLINE void LL_APB1_GRP1_EnableClock(uint32_t Periphs)
  1777. {
  1778. __IO uint32_t tmpreg;
  1779. SET_BIT(RCC->APB1LENR, Periphs);
  1780. /* Delay after an RCC peripheral clock enabling */
  1781. tmpreg = READ_BIT(RCC->APB1LENR, Periphs);
  1782. (void)tmpreg;
  1783. }
  1784. /**
  1785. * @brief Check if APB1 peripheral clock is enabled or not
  1786. * @rmtoll APB1LENR TIM2EN LL_APB1_GRP1_IsEnabledClock\n
  1787. * APB1LENR TIM3EN LL_APB1_GRP1_IsEnabledClock\n
  1788. * APB1LENR TIM4EN LL_APB1_GRP1_IsEnabledClock\n
  1789. * APB1LENR TIM5EN LL_APB1_GRP1_IsEnabledClock\n
  1790. * APB1LENR TIM6EN LL_APB1_GRP1_IsEnabledClock\n
  1791. * APB1LENR TIM7EN LL_APB1_GRP1_IsEnabledClock\n
  1792. * APB1LENR TIM12EN LL_APB1_GRP1_IsEnabledClock\n
  1793. * APB1LENR TIM13EN LL_APB1_GRP1_IsEnabledClock\n
  1794. * APB1LENR TIM14EN LL_APB1_GRP1_IsEnabledClock\n
  1795. * APB1LENR LPTIM1EN LL_APB1_GRP1_IsEnabledClock\n
  1796. * APB1LENR WWDG2EN LL_APB1_GRP1_IsEnabledClock\n (*)
  1797. * APB1LENR SPI2EN LL_APB1_GRP1_IsEnabledClock\n
  1798. * APB1LENR SPI3EN LL_APB1_GRP1_IsEnabledClock\n
  1799. * APB1LENR SPDIFRXEN LL_APB1_GRP1_IsEnabledClock\n
  1800. * APB1LENR USART2EN LL_APB1_GRP1_IsEnabledClock\n
  1801. * APB1LENR USART3EN LL_APB1_GRP1_IsEnabledClock\n
  1802. * APB1LENR UART4EN LL_APB1_GRP1_IsEnabledClock\n
  1803. * APB1LENR UART5EN LL_APB1_GRP1_IsEnabledClock\n
  1804. * APB1LENR I2C1EN LL_APB1_GRP1_IsEnabledClock\n
  1805. * APB1LENR I2C2EN LL_APB1_GRP1_IsEnabledClock\n
  1806. * APB1LENR I2C3EN LL_APB1_GRP1_IsEnabledClock\n
  1807. * APB1LENR I2C5EN LL_APB1_GRP1_IsEnabledClock\n (*)
  1808. * APB1LENR CECEN LL_APB1_GRP1_IsEnabledClock\n
  1809. * APB1LENR DAC12EN LL_APB1_GRP1_IsEnabledClock\n
  1810. * APB1LENR UART7EN LL_APB1_GRP1_IsEnabledClock\n
  1811. * APB1LENR UART8EN LL_APB1_GRP1_IsEnabledClock
  1812. * @param Periphs This parameter can be a combination of the following values:
  1813. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  1814. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  1815. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  1816. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  1817. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  1818. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  1819. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  1820. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  1821. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  1822. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  1823. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  1824. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  1825. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  1826. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  1827. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  1828. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  1829. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  1830. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  1831. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  1832. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  1833. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  1834. * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*)
  1835. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  1836. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  1837. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  1838. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  1839. *
  1840. * (*) value not defined in all devices.
  1841. * @retval uint32_t
  1842. */
  1843. __STATIC_INLINE uint32_t LL_APB1_GRP1_IsEnabledClock(uint32_t Periphs)
  1844. {
  1845. return ((READ_BIT(RCC->APB1LENR, Periphs) == Periphs) ? 1U : 0U);
  1846. }
  1847. /**
  1848. * @brief Disable APB1 peripherals clock.
  1849. * @rmtoll APB1LENR TIM2EN LL_APB1_GRP1_DisableClock\n
  1850. * APB1LENR TIM3EN LL_APB1_GRP1_DisableClock\n
  1851. * APB1LENR TIM4EN LL_APB1_GRP1_DisableClock\n
  1852. * APB1LENR TIM5EN LL_APB1_GRP1_DisableClock\n
  1853. * APB1LENR TIM6EN LL_APB1_GRP1_DisableClock\n
  1854. * APB1LENR TIM7EN LL_APB1_GRP1_DisableClock\n
  1855. * APB1LENR TIM12EN LL_APB1_GRP1_DisableClock\n
  1856. * APB1LENR TIM13EN LL_APB1_GRP1_DisableClock\n
  1857. * APB1LENR TIM14EN LL_APB1_GRP1_DisableClock\n
  1858. * APB1LENR LPTIM1EN LL_APB1_GRP1_DisableClock\n
  1859. * APB1LENR WWDG2EN LL_APB1_GRP1_DisableClock\n (*)
  1860. * APB1LENR SPI2EN LL_APB1_GRP1_DisableClock\n
  1861. * APB1LENR SPI3EN LL_APB1_GRP1_DisableClock\n
  1862. * APB1LENR SPDIFRXEN LL_APB1_GRP1_DisableClock\n
  1863. * APB1LENR USART2EN LL_APB1_GRP1_DisableClock\n
  1864. * APB1LENR USART3EN LL_APB1_GRP1_DisableClock\n
  1865. * APB1LENR UART4EN LL_APB1_GRP1_DisableClock\n
  1866. * APB1LENR UART5EN LL_APB1_GRP1_DisableClock\n
  1867. * APB1LENR I2C1EN LL_APB1_GRP1_DisableClock\n
  1868. * APB1LENR I2C2EN LL_APB1_GRP1_DisableClock\n
  1869. * APB1LENR I2C3EN LL_APB1_GRP1_DisableClock\n
  1870. * APB1LENR I2C5EN LL_APB1_GRP1_DisableClock\n (*)
  1871. * APB1LENR CECEN LL_APB1_GRP1_DisableClock\n
  1872. * APB1LENR DAC12EN LL_APB1_GRP1_DisableClock\n
  1873. * APB1LENR UART7EN LL_APB1_GRP1_DisableClock\n
  1874. * APB1LENR UART8EN LL_APB1_GRP1_DisableClock
  1875. * @param Periphs This parameter can be a combination of the following values:
  1876. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  1877. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  1878. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  1879. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  1880. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  1881. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  1882. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  1883. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  1884. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  1885. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  1886. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  1887. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  1888. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  1889. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  1890. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  1891. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  1892. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  1893. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  1894. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  1895. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  1896. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  1897. * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*)
  1898. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  1899. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  1900. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  1901. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  1902. *
  1903. * (*) value not defined in all devices.
  1904. * @retval None
  1905. */
  1906. __STATIC_INLINE void LL_APB1_GRP1_DisableClock(uint32_t Periphs)
  1907. {
  1908. CLEAR_BIT(RCC->APB1LENR, Periphs);
  1909. }
  1910. /**
  1911. * @brief Force APB1 peripherals reset.
  1912. * @rmtoll APB1LRSTR TIM2RST LL_APB1_GRP1_ForceReset\n
  1913. * APB1LRSTR TIM3RST LL_APB1_GRP1_ForceReset\n
  1914. * APB1LRSTR TIM4RST LL_APB1_GRP1_ForceReset\n
  1915. * APB1LRSTR TIM5RST LL_APB1_GRP1_ForceReset\n
  1916. * APB1LRSTR TIM6RST LL_APB1_GRP1_ForceReset\n
  1917. * APB1LRSTR TIM7RST LL_APB1_GRP1_ForceReset\n
  1918. * APB1LRSTR TIM12RST LL_APB1_GRP1_ForceReset\n
  1919. * APB1LRSTR TIM13RST LL_APB1_GRP1_ForceReset\n
  1920. * APB1LRSTR TIM14RST LL_APB1_GRP1_ForceReset\n
  1921. * APB1LRSTR LPTIM1RST LL_APB1_GRP1_ForceReset\n
  1922. * APB1LRSTR SPI2RST LL_APB1_GRP1_ForceReset\n
  1923. * APB1LRSTR SPI3RST LL_APB1_GRP1_ForceReset\n
  1924. * APB1LRSTR SPDIFRXRST LL_APB1_GRP1_ForceReset\n
  1925. * APB1LRSTR USART2RST LL_APB1_GRP1_ForceReset\n
  1926. * APB1LRSTR USART3RST LL_APB1_GRP1_ForceReset\n
  1927. * APB1LRSTR UART4RST LL_APB1_GRP1_ForceReset\n
  1928. * APB1LRSTR UART5RST LL_APB1_GRP1_ForceReset\n
  1929. * APB1LRSTR I2C1RST LL_APB1_GRP1_ForceReset\n
  1930. * APB1LRSTR I2C2RST LL_APB1_GRP1_ForceReset\n
  1931. * APB1LRSTR I2C3RST LL_APB1_GRP1_ForceReset\n
  1932. * APB1LRSTR I2C5RST LL_APB1_GRP5_ForceReset\n (*)
  1933. * APB1LRSTR CECRST LL_APB1_GRP1_ForceReset\n
  1934. * APB1LRSTR DAC12RST LL_APB1_GRP1_ForceReset\n
  1935. * APB1LRSTR UART7RST LL_APB1_GRP1_ForceReset\n
  1936. * APB1LRSTR UART8RST LL_APB1_GRP1_ForceReset
  1937. * @param Periphs This parameter can be a combination of the following values:
  1938. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  1939. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  1940. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  1941. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  1942. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  1943. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  1944. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  1945. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  1946. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  1947. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  1948. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  1949. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  1950. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  1951. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  1952. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  1953. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  1954. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  1955. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  1956. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  1957. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  1958. * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*)
  1959. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  1960. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  1961. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  1962. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  1963. *
  1964. * (*) value not defined in all devices.
  1965. * @retval None
  1966. */
  1967. __STATIC_INLINE void LL_APB1_GRP1_ForceReset(uint32_t Periphs)
  1968. {
  1969. SET_BIT(RCC->APB1LRSTR, Periphs);
  1970. }
  1971. /**
  1972. * @brief Release APB1 peripherals reset.
  1973. * @rmtoll APB1LRSTR TIM2RST LL_APB1_GRP1_ReleaseReset\n
  1974. * APB1LRSTR TIM3RST LL_APB1_GRP1_ReleaseReset\n
  1975. * APB1LRSTR TIM4RST LL_APB1_GRP1_ReleaseReset\n
  1976. * APB1LRSTR TIM5RST LL_APB1_GRP1_ReleaseReset\n
  1977. * APB1LRSTR TIM6RST LL_APB1_GRP1_ReleaseReset\n
  1978. * APB1LRSTR TIM7RST LL_APB1_GRP1_ReleaseReset\n
  1979. * APB1LRSTR TIM12RST LL_APB1_GRP1_ReleaseReset\n
  1980. * APB1LRSTR TIM13RST LL_APB1_GRP1_ReleaseReset\n
  1981. * APB1LRSTR TIM14RST LL_APB1_GRP1_ReleaseReset\n
  1982. * APB1LRSTR LPTIM1RST LL_APB1_GRP1_ReleaseReset\n
  1983. * APB1LRSTR SPI2RST LL_APB1_GRP1_ReleaseReset\n
  1984. * APB1LRSTR SPI3RST LL_APB1_GRP1_ReleaseReset\n
  1985. * APB1LRSTR SPDIFRXRST LL_APB1_GRP1_ReleaseReset\n
  1986. * APB1LRSTR USART2RST LL_APB1_GRP1_ReleaseReset\n
  1987. * APB1LRSTR USART3RST LL_APB1_GRP1_ReleaseReset\n
  1988. * APB1LRSTR UART4RST LL_APB1_GRP1_ReleaseReset\n
  1989. * APB1LRSTR UART5RST LL_APB1_GRP1_ReleaseReset\n
  1990. * APB1LRSTR I2C1RST LL_APB1_GRP1_ReleaseReset\n
  1991. * APB1LRSTR I2C2RST LL_APB1_GRP1_ReleaseReset\n
  1992. * APB1LRSTR I2C3RST LL_APB1_GRP1_ReleaseReset\n
  1993. * APB1LRSTR I2C5RST LL_APB1_GRP1_ReleaseReset\n (*)
  1994. * APB1LRSTR CECRST LL_APB1_GRP1_ReleaseReset\n
  1995. * APB1LRSTR DAC12RST LL_APB1_GRP1_ReleaseReset\n
  1996. * APB1LRSTR UART7RST LL_APB1_GRP1_ReleaseReset\n
  1997. * APB1LRSTR UART8RST LL_APB1_GRP1_ReleaseReset
  1998. * @param Periphs This parameter can be a combination of the following values:
  1999. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  2000. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  2001. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  2002. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  2003. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  2004. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  2005. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  2006. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  2007. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  2008. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  2009. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  2010. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  2011. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  2012. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  2013. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  2014. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  2015. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  2016. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  2017. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  2018. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  2019. * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*)
  2020. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  2021. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  2022. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  2023. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  2024. *
  2025. * (*) value not defined in all devices.
  2026. * @retval None
  2027. */
  2028. __STATIC_INLINE void LL_APB1_GRP1_ReleaseReset(uint32_t Periphs)
  2029. {
  2030. CLEAR_BIT(RCC->APB1LRSTR, Periphs);
  2031. }
  2032. /**
  2033. * @brief Enable APB1 peripherals clock during Low Power (Sleep) mode.
  2034. * @rmtoll APB1LLPENR TIM2LPEN LL_APB1_GRP1_EnableClockSleep\n
  2035. * APB1LLPENR TIM3LPEN LL_APB1_GRP1_EnableClockSleep\n
  2036. * APB1LLPENR TIM4LPEN LL_APB1_GRP1_EnableClockSleep\n
  2037. * APB1LLPENR TIM5LPEN LL_APB1_GRP1_EnableClockSleep\n
  2038. * APB1LLPENR TIM6LPEN LL_APB1_GRP1_EnableClockSleep\n
  2039. * APB1LLPENR TIM7LPEN LL_APB1_GRP1_EnableClockSleep\n
  2040. * APB1LLPENR TIM12LPEN LL_APB1_GRP1_EnableClockSleep\n
  2041. * APB1LLPENR TIM13LPEN LL_APB1_GRP1_EnableClockSleep\n
  2042. * APB1LLPENR TIM14LPEN LL_APB1_GRP1_EnableClockSleep\n
  2043. * APB1LLPENR LPTIM1LPEN LL_APB1_GRP1_EnableClockSleep\n
  2044. * APB1LLPENR WWDG2LPEN LL_APB1_GRP1_EnableClockSleep\n (*)
  2045. * APB1LLPENR SPI2LPEN LL_APB1_GRP1_EnableClockSleep\n
  2046. * APB1LLPENR SPI3LPEN LL_APB1_GRP1_EnableClockSleep\n
  2047. * APB1LLPENR SPDIFRXLPEN LL_APB1_GRP1_EnableClockSleep\n
  2048. * APB1LLPENR USART2LPEN LL_APB1_GRP1_EnableClockSleep\n
  2049. * APB1LLPENR USART3LPEN LL_APB1_GRP1_EnableClockSleep\n
  2050. * APB1LLPENR UART4LPEN LL_APB1_GRP1_EnableClockSleep\n
  2051. * APB1LLPENR UART5LPEN LL_APB1_GRP1_EnableClockSleep\n
  2052. * APB1LLPENR I2C1LPEN LL_APB1_GRP1_EnableClockSleep\n
  2053. * APB1LLPENR I2C2LPEN LL_APB1_GRP1_EnableClockSleep\n
  2054. * APB1LLPENR I2C3LPEN LL_APB1_GRP1_EnableClockSleep\n
  2055. * APB1LLPENR I2C5LPEN LL_APB1_GRP1_EnableClockSleep\n (*)
  2056. * APB1LLPENR CECLPEN LL_APB1_GRP1_EnableClockSleep\n
  2057. * APB1LLPENR DAC12LPEN LL_APB1_GRP1_EnableClockSleep\n
  2058. * APB1LLPENR UART7LPEN LL_APB1_GRP1_EnableClockSleep\n
  2059. * APB1LLPENR UART8LPEN LL_APB1_GRP1_EnableClockSleep
  2060. * @param Periphs This parameter can be a combination of the following values:
  2061. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  2062. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  2063. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  2064. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  2065. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  2066. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  2067. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  2068. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  2069. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  2070. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  2071. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  2072. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  2073. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  2074. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  2075. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  2076. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  2077. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  2078. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  2079. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  2080. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  2081. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  2082. * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*)
  2083. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  2084. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  2085. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  2086. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  2087. *
  2088. * (*) value not defined in all devices.
  2089. * @retval None
  2090. */
  2091. __STATIC_INLINE void LL_APB1_GRP1_EnableClockSleep(uint32_t Periphs)
  2092. {
  2093. __IO uint32_t tmpreg;
  2094. SET_BIT(RCC->APB1LLPENR, Periphs);
  2095. /* Delay after an RCC peripheral clock enabling */
  2096. tmpreg = READ_BIT(RCC->APB1LLPENR, Periphs);
  2097. (void)tmpreg;
  2098. }
  2099. /**
  2100. * @brief Disable APB1 peripherals clock during Low Power (Sleep) mode.
  2101. * @rmtoll APB1LLPENR TIM2LPEN LL_APB1_GRP1_DisableClockSleep\n
  2102. * APB1LLPENR TIM3LPEN LL_APB1_GRP1_DisableClockSleep\n
  2103. * APB1LLPENR TIM4LPEN LL_APB1_GRP1_DisableClockSleep\n
  2104. * APB1LLPENR TIM5LPEN LL_APB1_GRP1_DisableClockSleep\n
  2105. * APB1LLPENR TIM6LPEN LL_APB1_GRP1_DisableClockSleep\n
  2106. * APB1LLPENR TIM7LPEN LL_APB1_GRP1_DisableClockSleep\n
  2107. * APB1LLPENR TIM12LPEN LL_APB1_GRP1_DisableClockSleep\n
  2108. * APB1LLPENR TIM13LPEN LL_APB1_GRP1_DisableClockSleep\n
  2109. * APB1LLPENR TIM14LPEN LL_APB1_GRP1_DisableClockSleep\n
  2110. * APB1LLPENR LPTIM1LPEN LL_APB1_GRP1_DisableClockSleep\n
  2111. * APB1LLPENR WWDG2LPEN LL_APB1_GRP1_DisableClockSleep\n (*)
  2112. * APB1LLPENR SPI2LPEN LL_APB1_GRP1_DisableClockSleep\n
  2113. * APB1LLPENR SPI3LPEN LL_APB1_GRP1_DisableClockSleep\n
  2114. * APB1LLPENR SPDIFRXLPEN LL_APB1_GRP1_DisableClockSleep\n
  2115. * APB1LLPENR USART2LPEN LL_APB1_GRP1_DisableClockSleep\n
  2116. * APB1LLPENR USART3LPEN LL_APB1_GRP1_DisableClockSleep\n
  2117. * APB1LLPENR UART4LPEN LL_APB1_GRP1_DisableClockSleep\n
  2118. * APB1LLPENR UART5LPEN LL_APB1_GRP1_DisableClockSleep\n
  2119. * APB1LLPENR I2C1LPEN LL_APB1_GRP1_DisableClockSleep\n
  2120. * APB1LLPENR I2C2LPEN LL_APB1_GRP1_DisableClockSleep\n
  2121. * APB1LLPENR I2C3LPEN LL_APB1_GRP1_DisableClockSleep\n
  2122. * APB1LLPENR I2C5LPEN LL_APB1_GRP1_DisableClockSleep\n (*)
  2123. * APB1LLPENR CECLPEN LL_APB1_GRP1_DisableClockSleep\n
  2124. * APB1LLPENR DAC12LPEN LL_APB1_GRP1_DisableClockSleep\n
  2125. * APB1LLPENR UART7LPEN LL_APB1_GRP1_DisableClockSleep\n
  2126. * APB1LLPENR UART8LPEN LL_APB1_GRP1_DisableClockSleep
  2127. * @param Periphs This parameter can be a combination of the following values:
  2128. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  2129. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  2130. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  2131. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  2132. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  2133. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  2134. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  2135. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  2136. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  2137. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  2138. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  2139. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  2140. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  2141. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  2142. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  2143. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  2144. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  2145. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  2146. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  2147. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  2148. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  2149. * @arg @ref LL_APB1_GRP1_PERIPH_I2C5 (*)
  2150. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  2151. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  2152. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  2153. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  2154. *
  2155. * (*) value not defined in all devices.
  2156. * @retval None
  2157. */
  2158. __STATIC_INLINE void LL_APB1_GRP1_DisableClockSleep(uint32_t Periphs)
  2159. {
  2160. CLEAR_BIT(RCC->APB1LLPENR, Periphs);
  2161. }
  2162. /**
  2163. * @brief Enable APB1 peripherals clock.
  2164. * @rmtoll APB1HENR CRSEN LL_APB1_GRP2_EnableClock\n
  2165. * APB1HENR SWPMIEN LL_APB1_GRP2_EnableClock\n
  2166. * APB1HENR OPAMPEN LL_APB1_GRP2_EnableClock\n
  2167. * APB1HENR MDIOSEN LL_APB1_GRP2_EnableClock\n
  2168. * APB1HENR FDCANEN LL_APB1_GRP2_EnableClock
  2169. * @param Periphs This parameter can be a combination of the following values:
  2170. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  2171. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  2172. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  2173. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  2174. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  2175. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  2176. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  2177. *
  2178. * (*) value not defined in all devices.
  2179. * @retval None
  2180. */
  2181. __STATIC_INLINE void LL_APB1_GRP2_EnableClock(uint32_t Periphs)
  2182. {
  2183. __IO uint32_t tmpreg;
  2184. SET_BIT(RCC->APB1HENR, Periphs);
  2185. /* Delay after an RCC peripheral clock enabling */
  2186. tmpreg = READ_BIT(RCC->APB1HENR, Periphs);
  2187. (void)tmpreg;
  2188. }
  2189. /**
  2190. * @brief Check if APB1 peripheral clock is enabled or not
  2191. * @rmtoll APB1HENR CRSEN LL_APB1_GRP2_IsEnabledClock\n
  2192. * APB1HENR SWPMIEN LL_APB1_GRP2_IsEnabledClock\n
  2193. * APB1HENR OPAMPEN LL_APB1_GRP2_IsEnabledClock\n
  2194. * APB1HENR MDIOSEN LL_APB1_GRP2_IsEnabledClock\n
  2195. * APB1HENR FDCANEN LL_APB1_GRP2_IsEnabledClock
  2196. * @param Periphs This parameter can be a combination of the following values:
  2197. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  2198. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  2199. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  2200. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  2201. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  2202. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  2203. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  2204. *
  2205. * (*) value not defined in all devices.
  2206. * @retval uint32_t
  2207. */
  2208. __STATIC_INLINE uint32_t LL_APB1_GRP2_IsEnabledClock(uint32_t Periphs)
  2209. {
  2210. return ((READ_BIT(RCC->APB1HENR, Periphs) == Periphs) ? 1U : 0U);
  2211. }
  2212. /**
  2213. * @brief Disable APB1 peripherals clock.
  2214. * @rmtoll APB1HENR CRSEN LL_APB1_GRP2_DisableClock\n
  2215. * APB1HENR SWPMIEN LL_APB1_GRP2_DisableClock\n
  2216. * APB1HENR OPAMPEN LL_APB1_GRP2_DisableClock\n
  2217. * APB1HENR MDIOSEN LL_APB1_GRP2_DisableClock\n
  2218. * APB1HENR FDCANEN LL_APB1_GRP2_DisableClock
  2219. * @param Periphs This parameter can be a combination of the following values:
  2220. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  2221. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  2222. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  2223. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  2224. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  2225. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  2226. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  2227. *
  2228. * (*) value not defined in all devices.
  2229. * @retval None
  2230. */
  2231. __STATIC_INLINE void LL_APB1_GRP2_DisableClock(uint32_t Periphs)
  2232. {
  2233. CLEAR_BIT(RCC->APB1HENR, Periphs);
  2234. }
  2235. /**
  2236. * @brief Force APB1 peripherals reset.
  2237. * @rmtoll APB1HRSTR CRSRST LL_APB1_GRP2_ForceReset\n
  2238. * APB1HRSTR SWPMIRST LL_APB1_GRP2_ForceReset\n
  2239. * APB1HRSTR OPAMPRST LL_APB1_GRP2_ForceReset\n
  2240. * APB1HRSTR MDIOSRST LL_APB1_GRP2_ForceReset\n
  2241. * APB1HRSTR FDCANRST LL_APB1_GRP2_ForceReset
  2242. * @param Periphs This parameter can be a combination of the following values:
  2243. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  2244. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  2245. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  2246. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  2247. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  2248. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  2249. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  2250. *
  2251. * (*) value not defined in all devices.
  2252. * @retval None
  2253. */
  2254. __STATIC_INLINE void LL_APB1_GRP2_ForceReset(uint32_t Periphs)
  2255. {
  2256. SET_BIT(RCC->APB1HRSTR, Periphs);
  2257. }
  2258. /**
  2259. * @brief Release APB1 peripherals reset.
  2260. * @rmtoll APB1HRSTR CRSRST LL_APB1_GRP2_ReleaseReset\n
  2261. * APB1HRSTR SWPMIRST LL_APB1_GRP2_ReleaseReset\n
  2262. * APB1HRSTR OPAMPRST LL_APB1_GRP2_ReleaseReset\n
  2263. * APB1HRSTR MDIOSRST LL_APB1_GRP2_ReleaseReset\n
  2264. * APB1HRSTR FDCANRST LL_APB1_GRP2_ReleaseReset
  2265. * @param Periphs This parameter can be a combination of the following values:
  2266. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  2267. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  2268. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  2269. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  2270. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  2271. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  2272. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  2273. *
  2274. * (*) value not defined in all devices.
  2275. * @retval None
  2276. */
  2277. __STATIC_INLINE void LL_APB1_GRP2_ReleaseReset(uint32_t Periphs)
  2278. {
  2279. CLEAR_BIT(RCC->APB1HRSTR, Periphs);
  2280. }
  2281. /**
  2282. * @brief Enable APB1 peripherals clock during Low Power (Sleep) mode.
  2283. * @rmtoll APB1HLPENR CRSLPEN LL_APB1_GRP2_EnableClockSleep\n
  2284. * APB1HLPENR SWPMILPEN LL_APB1_GRP2_EnableClockSleep\n
  2285. * APB1HLPENR OPAMPLPEN LL_APB1_GRP2_EnableClockSleep\n
  2286. * APB1HLPENR MDIOSLPEN LL_APB1_GRP2_EnableClockSleep\n
  2287. * APB1HLPENR FDCANLPEN LL_APB1_GRP2_EnableClockSleep
  2288. * @param Periphs This parameter can be a combination of the following values:
  2289. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  2290. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  2291. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  2292. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  2293. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  2294. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  2295. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  2296. *
  2297. * (*) value not defined in all devices.
  2298. * @retval None
  2299. */
  2300. __STATIC_INLINE void LL_APB1_GRP2_EnableClockSleep(uint32_t Periphs)
  2301. {
  2302. __IO uint32_t tmpreg;
  2303. SET_BIT(RCC->APB1HLPENR, Periphs);
  2304. /* Delay after an RCC peripheral clock enabling */
  2305. tmpreg = READ_BIT(RCC->APB1HLPENR, Periphs);
  2306. (void)tmpreg;
  2307. }
  2308. /**
  2309. * @brief Disable APB1 peripherals clock during Low Power (Sleep) mode.
  2310. * @rmtoll APB1HLPENR CRSLPEN LL_APB1_GRP2_DisableClockSleep\n
  2311. * APB1HLPENR SWPMILPEN LL_APB1_GRP2_DisableClockSleep\n
  2312. * APB1HLPENR OPAMPLPEN LL_APB1_GRP2_DisableClockSleep\n
  2313. * APB1HLPENR MDIOSLPEN LL_APB1_GRP2_DisableClockSleep\n
  2314. * APB1HLPENR FDCANLPEN LL_APB1_GRP2_DisableClockSleep
  2315. * @param Periphs This parameter can be a combination of the following values:
  2316. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  2317. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  2318. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  2319. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  2320. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  2321. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  2322. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  2323. *
  2324. * (*) value not defined in all devices.
  2325. * @retval None
  2326. */
  2327. __STATIC_INLINE void LL_APB1_GRP2_DisableClockSleep(uint32_t Periphs)
  2328. {
  2329. CLEAR_BIT(RCC->APB1HLPENR, Periphs);
  2330. }
  2331. /**
  2332. * @}
  2333. */
  2334. /** @defgroup BUS_LL_EF_APB2 APB2
  2335. * @{
  2336. */
  2337. /**
  2338. * @brief Enable APB2 peripherals clock.
  2339. * @rmtoll APB2ENR TIM1EN LL_APB2_GRP1_EnableClock\n
  2340. * APB2ENR TIM8EN LL_APB2_GRP1_EnableClock\n
  2341. * APB2ENR USART1EN LL_APB2_GRP1_EnableClock\n
  2342. * APB2ENR USART6EN LL_APB2_GRP1_EnableClock\n
  2343. * APB2ENR UART9EN LL_APB2_GRP1_EnableClock\n (*)
  2344. * APB2ENR USART10EN LL_APB2_GRP1_EnableClock\n (*)
  2345. * APB2ENR SPI1EN LL_APB2_GRP1_EnableClock\n
  2346. * APB2ENR SPI4EN LL_APB2_GRP1_EnableClock\n
  2347. * APB2ENR TIM15EN LL_APB2_GRP1_EnableClock\n
  2348. * APB2ENR TIM16EN LL_APB2_GRP1_EnableClock\n
  2349. * APB2ENR TIM17EN LL_APB2_GRP1_EnableClock\n
  2350. * APB2ENR SPI5EN LL_APB2_GRP1_EnableClock\n
  2351. * APB2ENR SAI1EN LL_APB2_GRP1_EnableClock\n
  2352. * APB2ENR SAI2EN LL_APB2_GRP1_EnableClock\n
  2353. * APB2ENR SAI3EN LL_APB2_GRP1_EnableClock\n (*)
  2354. * APB2ENR DFSDM1EN LL_APB2_GRP1_EnableClock\n
  2355. * APB2ENR HRTIMEN LL_APB2_GRP1_EnableClock (*)
  2356. * @param Periphs This parameter can be a combination of the following values:
  2357. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  2358. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  2359. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  2360. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  2361. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  2362. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  2363. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  2364. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  2365. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  2366. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  2367. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  2368. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  2369. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  2370. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  2371. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  2372. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  2373. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  2374. *
  2375. * (*) value not defined in all devices.
  2376. * @retval None
  2377. */
  2378. __STATIC_INLINE void LL_APB2_GRP1_EnableClock(uint32_t Periphs)
  2379. {
  2380. __IO uint32_t tmpreg;
  2381. SET_BIT(RCC->APB2ENR, Periphs);
  2382. /* Delay after an RCC peripheral clock enabling */
  2383. tmpreg = READ_BIT(RCC->APB2ENR, Periphs);
  2384. (void)tmpreg;
  2385. }
  2386. /**
  2387. * @brief Check if APB2 peripheral clock is enabled or not
  2388. * @rmtoll APB2ENR TIM1EN LL_APB2_GRP1_IsEnabledClock\n
  2389. * APB2ENR TIM8EN LL_APB2_GRP1_IsEnabledClock\n
  2390. * APB2ENR USART1EN LL_APB2_GRP1_IsEnabledClock\n
  2391. * APB2ENR USART6EN LL_APB2_GRP1_IsEnabledClock\n
  2392. * APB2ENR UART9EN LL_APB2_GRP1_IsEnabledClock\n (*)
  2393. * APB2ENR USART10EN LL_APB2_GRP1_IsEnabledClock\n (*)
  2394. * APB2ENR SPI1EN LL_APB2_GRP1_IsEnabledClock\n
  2395. * APB2ENR SPI4EN LL_APB2_GRP1_IsEnabledClock\n
  2396. * APB2ENR TIM15EN LL_APB2_GRP1_IsEnabledClock\n
  2397. * APB2ENR TIM16EN LL_APB2_GRP1_IsEnabledClock\n
  2398. * APB2ENR TIM17EN LL_APB2_GRP1_IsEnabledClock\n
  2399. * APB2ENR SPI5EN LL_APB2_GRP1_IsEnabledClock\n
  2400. * APB2ENR SAI1EN LL_APB2_GRP1_IsEnabledClock\n
  2401. * APB2ENR SAI2EN LL_APB2_GRP1_IsEnabledClock\n
  2402. * APB2ENR SAI3EN LL_APB2_GRP1_IsEnabledClock\n
  2403. * APB2ENR DFSDM1EN LL_APB2_GRP1_IsEnabledClock\n
  2404. * APB2ENR HRTIMEN LL_APB2_GRP1_IsEnabledClock
  2405. * @param Periphs This parameter can be a combination of the following values:
  2406. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  2407. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  2408. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  2409. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  2410. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  2411. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  2412. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  2413. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  2414. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  2415. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  2416. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  2417. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  2418. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  2419. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  2420. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  2421. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  2422. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  2423. *
  2424. * (*) value not defined in all devices.
  2425. * @retval uint32_t
  2426. */
  2427. __STATIC_INLINE uint32_t LL_APB2_GRP1_IsEnabledClock(uint32_t Periphs)
  2428. {
  2429. return ((READ_BIT(RCC->APB2ENR, Periphs) == Periphs) ? 1U : 0U);
  2430. }
  2431. /**
  2432. * @brief Disable APB2 peripherals clock.
  2433. * @rmtoll APB2ENR TIM1EN LL_APB2_GRP1_DisableClock\n
  2434. * APB2ENR TIM8EN LL_APB2_GRP1_DisableClock\n
  2435. * APB2ENR USART1EN LL_APB2_GRP1_DisableClock\n
  2436. * APB2ENR USART6EN LL_APB2_GRP1_DisableClock\n
  2437. * APB2ENR UART9EN LL_APB2_GRP1_DisableClock\n (*)
  2438. * APB2ENR USART10EN LL_APB2_GRP1_DisableClock\n (*)
  2439. * APB2ENR SPI1EN LL_APB2_GRP1_DisableClock\n
  2440. * APB2ENR SPI4EN LL_APB2_GRP1_DisableClock\n
  2441. * APB2ENR TIM15EN LL_APB2_GRP1_DisableClock\n
  2442. * APB2ENR TIM16EN LL_APB2_GRP1_DisableClock\n
  2443. * APB2ENR TIM17EN LL_APB2_GRP1_DisableClock\n
  2444. * APB2ENR SPI5EN LL_APB2_GRP1_DisableClock\n
  2445. * APB2ENR SAI1EN LL_APB2_GRP1_DisableClock\n
  2446. * APB2ENR SAI2EN LL_APB2_GRP1_DisableClock\n
  2447. * APB2ENR SAI3EN LL_APB2_GRP1_DisableClock\n (*)
  2448. * APB2ENR DFSDM1EN LL_APB2_GRP1_DisableClock\n
  2449. * APB2ENR HRTIMEN LL_APB2_GRP1_DisableClock (*)
  2450. * @param Periphs This parameter can be a combination of the following values:
  2451. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  2452. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  2453. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  2454. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  2455. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  2456. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  2457. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  2458. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  2459. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  2460. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  2461. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  2462. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  2463. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  2464. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  2465. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  2466. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  2467. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  2468. *
  2469. * (*) value not defined in all devices.
  2470. * @retval None
  2471. */
  2472. __STATIC_INLINE void LL_APB2_GRP1_DisableClock(uint32_t Periphs)
  2473. {
  2474. CLEAR_BIT(RCC->APB2ENR, Periphs);
  2475. }
  2476. /**
  2477. * @brief Force APB2 peripherals reset.
  2478. * @rmtoll APB2RSTR TIM1RST LL_APB2_GRP1_ForceReset\n
  2479. * APB2RSTR TIM8RST LL_APB2_GRP1_ForceReset\n
  2480. * APB2RSTR USART1RST LL_APB2_GRP1_ForceReset\n
  2481. * APB2RSTR USART6RST LL_APB2_GRP1_ForceReset\n
  2482. * APB2ENR UART9RST LL_APB2_GRP1_ForceReset\n (*)
  2483. * APB2ENR USART10RST LL_APB2_GRP1_ForceReset\n (*)
  2484. * APB2RSTR SPI1RST LL_APB2_GRP1_ForceReset\n
  2485. * APB2RSTR SPI4RST LL_APB2_GRP1_ForceReset\n
  2486. * APB2RSTR TIM15RST LL_APB2_GRP1_ForceReset\n
  2487. * APB2RSTR TIM16RST LL_APB2_GRP1_ForceReset\n
  2488. * APB2RSTR TIM17RST LL_APB2_GRP1_ForceReset\n
  2489. * APB2RSTR SPI5RST LL_APB2_GRP1_ForceReset\n
  2490. * APB2RSTR SAI1RST LL_APB2_GRP1_ForceReset\n
  2491. * APB2RSTR SAI2RST LL_APB2_GRP1_ForceReset\n
  2492. * APB2RSTR SAI3RST LL_APB2_GRP1_ForceReset\n (*)
  2493. * APB2RSTR DFSDM1RST LL_APB2_GRP1_ForceReset\n
  2494. * APB2RSTR HRTIMRST LL_APB2_GRP1_ForceReset (*)
  2495. * @param Periphs This parameter can be a combination of the following values:
  2496. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  2497. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  2498. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  2499. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  2500. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  2501. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  2502. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  2503. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  2504. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  2505. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  2506. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  2507. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  2508. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  2509. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  2510. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  2511. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  2512. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  2513. *
  2514. * (*) value not defined in all devices.
  2515. * @retval None
  2516. */
  2517. __STATIC_INLINE void LL_APB2_GRP1_ForceReset(uint32_t Periphs)
  2518. {
  2519. SET_BIT(RCC->APB2RSTR, Periphs);
  2520. }
  2521. /**
  2522. * @brief Release APB2 peripherals reset.
  2523. * @rmtoll APB2RSTR TIM1RST LL_APB2_GRP1_ReleaseReset\n
  2524. * APB2RSTR TIM8RST LL_APB2_GRP1_ReleaseReset\n
  2525. * APB2RSTR USART1RST LL_APB2_GRP1_ReleaseReset\n
  2526. * APB2RSTR USART6RST LL_APB2_GRP1_ReleaseReset\n
  2527. * APB2ENR UART9RST LL_APB2_GRP1_ReleaseReset\n (*)
  2528. * APB2ENR USART10RST LL_APB2_GRP1_ReleaseReset\n (*)
  2529. * APB2RSTR SPI1RST LL_APB2_GRP1_ReleaseReset\n
  2530. * APB2RSTR SPI4RST LL_APB2_GRP1_ReleaseReset\n
  2531. * APB2RSTR TIM15RST LL_APB2_GRP1_ReleaseReset\n
  2532. * APB2RSTR TIM16RST LL_APB2_GRP1_ReleaseReset\n
  2533. * APB2RSTR TIM17RST LL_APB2_GRP1_ReleaseReset\n
  2534. * APB2RSTR SPI5RST LL_APB2_GRP1_ReleaseReset\n
  2535. * APB2RSTR SAI1RST LL_APB2_GRP1_ReleaseReset\n
  2536. * APB2RSTR SAI2RST LL_APB2_GRP1_ReleaseReset\n
  2537. * APB2RSTR SAI3RST LL_APB2_GRP1_ReleaseReset\n (*)
  2538. * APB2RSTR DFSDM1RST LL_APB2_GRP1_ReleaseReset\n
  2539. * APB2RSTR HRTIMRST LL_APB2_GRP1_ReleaseReset (*)
  2540. * @param Periphs This parameter can be a combination of the following values:
  2541. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  2542. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  2543. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  2544. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  2545. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  2546. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  2547. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  2548. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  2549. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  2550. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  2551. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  2552. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  2553. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  2554. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  2555. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  2556. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  2557. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  2558. *
  2559. * (*) value not defined in all devices.
  2560. * @retval None
  2561. */
  2562. __STATIC_INLINE void LL_APB2_GRP1_ReleaseReset(uint32_t Periphs)
  2563. {
  2564. CLEAR_BIT(RCC->APB2RSTR, Periphs);
  2565. }
  2566. /**
  2567. * @brief Enable APB2 peripherals clock during Low Power (Sleep) mode.
  2568. * @rmtoll APB2LPENR TIM1LPEN LL_APB2_GRP1_EnableClockSleep\n
  2569. * APB2LPENR TIM8LPEN LL_APB2_GRP1_EnableClockSleep\n
  2570. * APB2LPENR USART1LPEN LL_APB2_GRP1_EnableClockSleep\n
  2571. * APB2LPENR USART6LPEN LL_APB2_GRP1_EnableClockSleep\n
  2572. * APB2ENR UART9LPEN LL_APB2_GRP1_EnableClockSleep\n (*)
  2573. * APB2ENR USART10LPEN LL_APB2_GRP1_EnableClockSleep\n (*)
  2574. * APB2LPENR SPI1LPEN LL_APB2_GRP1_EnableClockSleep\n
  2575. * APB2LPENR SPI4LPEN LL_APB2_GRP1_EnableClockSleep\n
  2576. * APB2LPENR TIM15LPEN LL_APB2_GRP1_EnableClockSleep\n
  2577. * APB2LPENR TIM16LPEN LL_APB2_GRP1_EnableClockSleep\n
  2578. * APB2LPENR TIM17LPEN LL_APB2_GRP1_EnableClockSleep\n
  2579. * APB2LPENR SPI5LPEN LL_APB2_GRP1_EnableClockSleep\n
  2580. * APB2LPENR SAI1LPEN LL_APB2_GRP1_EnableClockSleep\n
  2581. * APB2LPENR SAI2LPEN LL_APB2_GRP1_EnableClockSleep\n
  2582. * APB2LPENR SAI3LPEN LL_APB2_GRP1_EnableClockSleep\n (*)
  2583. * APB2LPENR DFSDM1LPEN LL_APB2_GRP1_EnableClockSleep\n
  2584. * APB2LPENR HRTIMLPEN LL_APB2_GRP1_EnableClockSleep (*)
  2585. * @param Periphs This parameter can be a combination of the following values:
  2586. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  2587. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  2588. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  2589. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  2590. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  2591. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  2592. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  2593. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  2594. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  2595. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  2596. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  2597. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  2598. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  2599. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  2600. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  2601. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  2602. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  2603. *
  2604. * (*) value not defined in all devices.
  2605. * @retval None
  2606. */
  2607. __STATIC_INLINE void LL_APB2_GRP1_EnableClockSleep(uint32_t Periphs)
  2608. {
  2609. __IO uint32_t tmpreg;
  2610. SET_BIT(RCC->APB2LPENR, Periphs);
  2611. /* Delay after an RCC peripheral clock enabling */
  2612. tmpreg = READ_BIT(RCC->APB2LPENR, Periphs);
  2613. (void)tmpreg;
  2614. }
  2615. /**
  2616. * @brief Disable APB2 peripherals clock during Low Power (Sleep) mode.
  2617. * @rmtoll APB2LPENR TIM1LPEN LL_APB2_GRP1_DisableClockSleep\n
  2618. * APB2LPENR TIM8LPEN LL_APB2_GRP1_DisableClockSleep\n
  2619. * APB2LPENR USART1LPEN LL_APB2_GRP1_DisableClockSleep\n
  2620. * APB2LPENR USART6LPEN LL_APB2_GRP1_DisableClockSleep\n
  2621. * APB2ENR UART9LPEN LL_APB2_GRP1_DisableClockSleep\n (*)
  2622. * APB2ENR USART10LPEN LL_APB2_GRP1_DisableClockSleep\n (*)
  2623. * APB2LPENR SPI1LPEN LL_APB2_GRP1_DisableClockSleep\n
  2624. * APB2LPENR SPI4LPEN LL_APB2_GRP1_DisableClockSleep\n
  2625. * APB2LPENR TIM15LPEN LL_APB2_GRP1_DisableClockSleep\n
  2626. * APB2LPENR TIM16LPEN LL_APB2_GRP1_DisableClockSleep\n
  2627. * APB2LPENR TIM17LPEN LL_APB2_GRP1_DisableClockSleep\n
  2628. * APB2LPENR SPI5LPEN LL_APB2_GRP1_DisableClockSleep\n
  2629. * APB2LPENR SAI1LPEN LL_APB2_GRP1_DisableClockSleep\n
  2630. * APB2LPENR SAI2LPEN LL_APB2_GRP1_DisableClockSleep\n
  2631. * APB2LPENR SAI3LPEN LL_APB2_GRP1_DisableClockSleep\n (*)
  2632. * APB2LPENR DFSDM1LPEN LL_APB2_GRP1_DisableClockSleep\n
  2633. * APB2LPENR HRTIMLPEN LL_APB2_GRP1_DisableClockSleep (*)
  2634. * @param Periphs This parameter can be a combination of the following values:
  2635. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  2636. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  2637. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  2638. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  2639. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  2640. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  2641. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  2642. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  2643. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  2644. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  2645. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  2646. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  2647. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  2648. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  2649. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  2650. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  2651. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  2652. *
  2653. * (*) value not defined in all devices.
  2654. * @retval None
  2655. */
  2656. __STATIC_INLINE void LL_APB2_GRP1_DisableClockSleep(uint32_t Periphs)
  2657. {
  2658. CLEAR_BIT(RCC->APB2LPENR, Periphs);
  2659. }
  2660. /**
  2661. * @}
  2662. */
  2663. /** @defgroup BUS_LL_EF_APB4 APB4
  2664. * @{
  2665. */
  2666. /**
  2667. * @brief Enable APB4 peripherals clock.
  2668. * @rmtoll APB4ENR SYSCFGEN LL_APB4_GRP1_EnableClock\n
  2669. * APB4ENR LPUART1EN LL_APB4_GRP1_EnableClock\n
  2670. * APB4ENR SPI6EN LL_APB4_GRP1_EnableClock\n
  2671. * APB4ENR I2C4EN LL_APB4_GRP1_EnableClock\n
  2672. * APB4ENR LPTIM2EN LL_APB4_GRP1_EnableClock\n
  2673. * APB4ENR LPTIM3EN LL_APB4_GRP1_EnableClock\n
  2674. * APB4ENR LPTIM4EN LL_APB4_GRP1_EnableClock\n (*)
  2675. * APB4ENR LPTIM5EN LL_APB4_GRP1_EnableClock\n (*)
  2676. * APB4ENR DAC2EN LL_APB4_GRP1_EnableClock\n (*)
  2677. * APB4ENR COMP12EN LL_APB4_GRP1_EnableClock\n
  2678. * APB4ENR VREFEN LL_APB4_GRP1_EnableClock\n
  2679. * APB4ENR RTCAPBEN LL_APB4_GRP1_EnableClock\n
  2680. * APB4ENR SAI4EN LL_APB4_GRP1_EnableClock\n (*)
  2681. * APB4ENR DTSEN LL_APB4_GRP1_EnableClock\n (*)
  2682. * APB4ENR DFSDM2EN LL_APB4_GRP1_EnableClock (*)
  2683. * @param Periphs This parameter can be a combination of the following values:
  2684. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  2685. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  2686. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  2687. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  2688. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  2689. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  2690. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  2691. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  2692. * @arg @ref LL_APB4_GRP1_PERIPH_DAC2 (*)
  2693. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  2694. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  2695. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  2696. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  2697. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  2698. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  2699. *
  2700. * (*) value not defined in all devices.
  2701. * @retval None
  2702. */
  2703. __STATIC_INLINE void LL_APB4_GRP1_EnableClock(uint32_t Periphs)
  2704. {
  2705. __IO uint32_t tmpreg;
  2706. SET_BIT(RCC->APB4ENR, Periphs);
  2707. /* Delay after an RCC peripheral clock enabling */
  2708. tmpreg = READ_BIT(RCC->APB4ENR, Periphs);
  2709. (void)tmpreg;
  2710. }
  2711. /**
  2712. * @brief Check if APB4 peripheral clock is enabled or not
  2713. * @rmtoll APB4ENR SYSCFGEN LL_APB4_GRP1_IsEnabledClock\n
  2714. * APB4ENR LPUART1EN LL_APB4_GRP1_IsEnabledClock\n
  2715. * APB4ENR SPI6EN LL_APB4_GRP1_IsEnabledClock\n
  2716. * APB4ENR I2C4EN LL_APB4_GRP1_IsEnabledClock\n
  2717. * APB4ENR LPTIM2EN LL_APB4_GRP1_IsEnabledClock\n
  2718. * APB4ENR LPTIM3EN LL_APB4_GRP1_IsEnabledClock\n
  2719. * APB4ENR LPTIM4EN LL_APB4_GRP1_IsEnabledClock\n (*)
  2720. * APB4ENR LPTIM5EN LL_APB4_GRP1_IsEnabledClock\n (*)
  2721. * APB4ENR DAC2EN LL_APB4_GRP1_IsEnabledClock\n (*)
  2722. * APB4ENR COMP12EN LL_APB4_GRP1_IsEnabledClock\n
  2723. * APB4ENR VREFEN LL_APB4_GRP1_IsEnabledClock\n
  2724. * APB4ENR RTCAPBEN LL_APB4_GRP1_IsEnabledClock\n
  2725. * APB4ENR SAI4EN LL_APB4_GRP1_IsEnabledClock\n (*)
  2726. * APB4ENR DTSEN LL_APB4_GRP1_IsEnabledClock\n (*)
  2727. * APB4ENR DFSDM2EN LL_APB4_GRP1_IsEnabledClock (*)
  2728. * @param Periphs This parameter can be a combination of the following values:
  2729. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  2730. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  2731. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  2732. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  2733. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  2734. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  2735. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  2736. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  2737. * @arg @ref LL_APB4_GRP1_PERIPH_DAC2 (*)
  2738. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  2739. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  2740. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  2741. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  2742. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  2743. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  2744. *
  2745. * (*) value not defined in all devices.
  2746. * @retval uint32_t
  2747. */
  2748. __STATIC_INLINE uint32_t LL_APB4_GRP1_IsEnabledClock(uint32_t Periphs)
  2749. {
  2750. return ((READ_BIT(RCC->APB4ENR, Periphs) == Periphs) ? 1U : 0U);
  2751. }
  2752. /**
  2753. * @brief Disable APB4 peripherals clock.
  2754. * @rmtoll APB4ENR SYSCFGEN LL_APB4_GRP1_DisableClock\n
  2755. * APB4ENR LPUART1EN LL_APB4_GRP1_DisableClock\n
  2756. * APB4ENR SPI6EN LL_APB4_GRP1_DisableClock\n
  2757. * APB4ENR I2C4EN LL_APB4_GRP1_DisableClock\n
  2758. * APB4ENR LPTIM2EN LL_APB4_GRP1_DisableClock\n
  2759. * APB4ENR LPTIM3EN LL_APB4_GRP1_DisableClock\n
  2760. * APB4ENR LPTIM4EN LL_APB4_GRP1_DisableClock\n (*)
  2761. * APB4ENR LPTIM5EN LL_APB4_GRP1_DisableClock\n (*)
  2762. * APB4ENR DAC2EN LL_APB4_GRP1_DisableClock\n (*)
  2763. * APB4ENR COMP12EN LL_APB4_GRP1_DisableClock\n
  2764. * APB4ENR VREFEN LL_APB4_GRP1_DisableClock\n
  2765. * APB4ENR RTCAPBEN LL_APB4_GRP1_DisableClock\n
  2766. * APB4ENR SAI4EN LL_APB4_GRP1_DisableClock\n (*)
  2767. * APB4ENR DTSEN LL_APB4_GRP1_DisableClock\n (*)
  2768. * APB4ENR DFSDM2EN LL_APB4_GRP1_DisableClock (*)
  2769. * @param Periphs This parameter can be a combination of the following values:
  2770. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  2771. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  2772. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  2773. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  2774. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  2775. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  2776. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  2777. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  2778. * @arg @ref LL_APB4_GRP1_PERIPH_DAC2 (*)
  2779. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  2780. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  2781. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  2782. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  2783. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  2784. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  2785. *
  2786. * (*) value not defined in all devices.
  2787. * @retval None
  2788. */
  2789. __STATIC_INLINE void LL_APB4_GRP1_DisableClock(uint32_t Periphs)
  2790. {
  2791. CLEAR_BIT(RCC->APB4ENR, Periphs);
  2792. }
  2793. /**
  2794. * @brief Force APB4 peripherals reset.
  2795. * @rmtoll APB4RSTR SYSCFGRST LL_APB4_GRP1_ForceReset\n
  2796. * APB4RSTR LPUART1RST LL_APB4_GRP1_ForceReset\n
  2797. * APB4RSTR SPI6RST LL_APB4_GRP1_ForceReset\n
  2798. * APB4RSTR I2C4RST LL_APB4_GRP1_ForceReset\n
  2799. * APB4RSTR LPTIM2RST LL_APB4_GRP1_ForceReset\n
  2800. * APB4RSTR LPTIM3RST LL_APB4_GRP1_ForceReset\n
  2801. * APB4RSTR LPTIM4RST LL_APB4_GRP1_ForceReset\n (*)
  2802. * APB4RSTR LPTIM5RST LL_APB4_GRP1_ForceReset\n (*)
  2803. * APB4RSTR DAC2EN LL_APB4_GRP1_ForceReset\n (*)
  2804. * APB4RSTR COMP12RST LL_APB4_GRP1_ForceReset\n
  2805. * APB4RSTR VREFRST LL_APB4_GRP1_ForceReset\n
  2806. * APB4RSTR SAI4RST LL_APB4_GRP1_ForceReset\n (*)
  2807. * APB4RSTR DTSRST LL_APB4_GRP1_ForceReset\n (*)
  2808. * APB4RSTR DFSDM2RST LL_APB4_GRP1_ForceReset (*)
  2809. * @param Periphs This parameter can be a combination of the following values:
  2810. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  2811. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  2812. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  2813. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  2814. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  2815. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  2816. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  2817. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  2818. * @arg @ref LL_APB4_GRP1_PERIPH_DAC2 (*)
  2819. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  2820. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  2821. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  2822. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  2823. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  2824. *
  2825. * (*) value not defined in all devices.
  2826. * @retval None
  2827. */
  2828. __STATIC_INLINE void LL_APB4_GRP1_ForceReset(uint32_t Periphs)
  2829. {
  2830. SET_BIT(RCC->APB4RSTR, Periphs);
  2831. }
  2832. /**
  2833. * @brief Release APB4 peripherals reset.
  2834. * @rmtoll APB4RSTR SYSCFGRST LL_APB4_GRP1_ReleaseReset\n
  2835. * APB4RSTR LPUART1RST LL_APB4_GRP1_ReleaseReset\n
  2836. * APB4RSTR SPI6RST LL_APB4_GRP1_ReleaseReset\n
  2837. * APB4RSTR I2C4RST LL_APB4_GRP1_ReleaseReset\n
  2838. * APB4RSTR LPTIM2RST LL_APB4_GRP1_ReleaseReset\n
  2839. * APB4RSTR LPTIM3RST LL_APB4_GRP1_ReleaseReset\n
  2840. * APB4RSTR LPTIM4RST LL_APB4_GRP1_ReleaseReset\n (*)
  2841. * APB4RSTR LPTIM5RST LL_APB4_GRP1_ReleaseReset\n (*)
  2842. * APB4RSTR DAC2RST LL_APB4_GRP1_ReleaseReset\n (*)
  2843. * APB4RSTR COMP12RST LL_APB4_GRP1_ReleaseReset\n
  2844. * APB4RSTR VREFRST LL_APB4_GRP1_ReleaseReset\n
  2845. * APB4RSTR SAI4RST LL_APB4_GRP1_ReleaseReset\n
  2846. * APB4RSTR DTSRST LL_APB4_GRP1_ReleaseReset\n (*)
  2847. * APB4RSTR DFSDM2RST LL_APB4_GRP1_ReleaseReset (*)
  2848. * @param Periphs This parameter can be a combination of the following values:
  2849. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  2850. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  2851. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  2852. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  2853. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  2854. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  2855. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  2856. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  2857. * @arg @ref LL_APB4_GRP1_PERIPH_DAC2 (*)
  2858. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  2859. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  2860. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  2861. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  2862. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  2863. *
  2864. * (*) value not defined in all devices.
  2865. * @retval None
  2866. */
  2867. __STATIC_INLINE void LL_APB4_GRP1_ReleaseReset(uint32_t Periphs)
  2868. {
  2869. CLEAR_BIT(RCC->APB4RSTR, Periphs);
  2870. }
  2871. /**
  2872. * @brief Enable APB4 peripherals clock during Low Power (Sleep) mode.
  2873. * @rmtoll APB4LPENR SYSCFGLPEN LL_APB4_GRP1_EnableClockSleep\n
  2874. * APB4LPENR LPUART1LPEN LL_APB4_GRP1_EnableClockSleep\n
  2875. * APB4LPENR SPI6LPEN LL_APB4_GRP1_EnableClockSleep\n
  2876. * APB4LPENR I2C4LPEN LL_APB4_GRP1_EnableClockSleep\n
  2877. * APB4LPENR LPTIM2LPEN LL_APB4_GRP1_EnableClockSleep\n
  2878. * APB4LPENR LPTIM3LPEN LL_APB4_GRP1_EnableClockSleep\n
  2879. * APB4LPENR LPTIM4LPEN LL_APB4_GRP1_EnableClockSleep\n (*)
  2880. * APB4LPENR LPTIM5LPEN LL_APB4_GRP1_EnableClockSleep\n (*)
  2881. * APB4LPENR DAC2LPEN LL_APB4_GRP1_EnableClockSleep\n (*)
  2882. * APB4LPENR COMP12LPEN LL_APB4_GRP1_EnableClockSleep\n
  2883. * APB4LPENR VREFLPEN LL_APB4_GRP1_EnableClockSleep\n
  2884. * APB4LPENR RTCAPBLPEN LL_APB4_GRP1_EnableClockSleep\n
  2885. * APB4LPENR SAI4LPEN LL_APB4_GRP1_EnableClockSleep\n (*)
  2886. * APB4LPENR DTSLPEN LL_APB4_GRP1_EnableClockSleep\n (*)
  2887. * APB4LPENR DFSDM2LPEN LL_APB4_GRP1_EnableClockSleep (*)
  2888. * @param Periphs This parameter can be a combination of the following values:
  2889. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  2890. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  2891. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  2892. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  2893. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  2894. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  2895. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  2896. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  2897. * @arg @ref LL_APB4_GRP1_PERIPH_DAC2 (*)
  2898. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  2899. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  2900. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  2901. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  2902. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  2903. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  2904. *
  2905. * (*) value not defined in all devices.
  2906. * @retval None
  2907. */
  2908. __STATIC_INLINE void LL_APB4_GRP1_EnableClockSleep(uint32_t Periphs)
  2909. {
  2910. __IO uint32_t tmpreg;
  2911. SET_BIT(RCC->APB4LPENR, Periphs);
  2912. /* Delay after an RCC peripheral clock enabling */
  2913. tmpreg = READ_BIT(RCC->APB4LPENR, Periphs);
  2914. (void)tmpreg;
  2915. }
  2916. /**
  2917. * @brief Disable APB4 peripherals clock during Low Power (Sleep) mode.
  2918. * @rmtoll APB4LPENR SYSCFGLPEN LL_APB4_GRP1_DisableClockSleep\n
  2919. * APB4LPENR LPUART1LPEN LL_APB4_GRP1_DisableClockSleep\n
  2920. * APB4LPENR SPI6LPEN LL_APB4_GRP1_DisableClockSleep\n
  2921. * APB4LPENR I2C4LPEN LL_APB4_GRP1_DisableClockSleep\n
  2922. * APB4LPENR LPTIM2LPEN LL_APB4_GRP1_DisableClockSleep\n
  2923. * APB4LPENR LPTIM3LPEN LL_APB4_GRP1_DisableClockSleep\n
  2924. * APB4LPENR LPTIM4LPEN LL_APB4_GRP1_DisableClockSleep\n (*)
  2925. * APB4LPENR LPTIM5LPEN LL_APB4_GRP1_DisableClockSleep\n (*)
  2926. * APB4LPENR DAC2LPEN LL_APB4_GRP1_DisableClockSleep\n (*)
  2927. * APB4LPENR COMP12LPEN LL_APB4_GRP1_DisableClockSleep\n
  2928. * APB4LPENR VREFLPEN LL_APB4_GRP1_DisableClockSleep\n
  2929. * APB4LPENR RTCAPBLPEN LL_APB4_GRP1_DisableClockSleep\n
  2930. * APB4LPENR SAI4LPEN LL_APB4_GRP1_DisableClockSleep\n (*)
  2931. * APB4LPENR DTSLPEN LL_APB4_GRP1_DisableClockSleep\n (*)
  2932. * APB4LPENR DFSDM2LPEN LL_APB4_GRP1_DisableClockSleep (*)
  2933. * @param Periphs This parameter can be a combination of the following values:
  2934. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  2935. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  2936. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  2937. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  2938. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  2939. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  2940. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  2941. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  2942. * @arg @ref LL_APB4_GRP1_PERIPH_DAC2 (*)
  2943. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  2944. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  2945. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  2946. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  2947. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  2948. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  2949. *
  2950. * (*) value not defined in all devices.
  2951. * @retval None
  2952. */
  2953. __STATIC_INLINE void LL_APB4_GRP1_DisableClockSleep(uint32_t Periphs)
  2954. {
  2955. CLEAR_BIT(RCC->APB4LPENR, Periphs);
  2956. }
  2957. /**
  2958. * @}
  2959. */
  2960. /** @defgroup BUS_LL_EF_CLKAM CLKAM
  2961. * @{
  2962. */
  2963. /**
  2964. * @brief Enable peripherals clock for CLKAM Mode.
  2965. * @rmtoll D3AMR / SRDAMR BDMA LL_CLKAM_Enable\n
  2966. * D3AMR / SRDAMR LPUART1 LL_CLKAM_Enable\n
  2967. * D3AMR / SRDAMR SPI6 LL_CLKAM_Enable\n
  2968. * D3AMR / SRDAMR I2C4 LL_CLKAM_Enable\n
  2969. * D3AMR / SRDAMR LPTIM2 LL_CLKAM_Enable\n
  2970. * D3AMR / SRDAMR LPTIM3 LL_CLKAM_Enable\n
  2971. * D3AMR / SRDAMR LPTIM4 LL_CLKAM_Enable\n (*)
  2972. * D3AMR / SRDAMR LPTIM5 LL_CLKAM_Enable\n (*)
  2973. * D3AMR / SRDAMR DAC2 LL_CLKAM_Enable\n (*)
  2974. * D3AMR / SRDAMR COMP12 LL_CLKAM_Enable\n
  2975. * D3AMR / SRDAMR VREF LL_CLKAM_Enable\n
  2976. * D3AMR / SRDAMR RTC LL_CLKAM_Enable\n
  2977. * D3AMR / SRDAMR CRC LL_CLKAM_Enable\n
  2978. * D3AMR / SRDAMR SAI4 LL_CLKAM_Enable\n (*)
  2979. * D3AMR / SRDAMR ADC3 LL_CLKAM_Enable\n (*)
  2980. * D3AMR / SRDAMR DTS LL_CLKAM_Enable\n (*)
  2981. * D3AMR / SRDAMR DFSDM2 LL_CLKAM_Enable\n (*)
  2982. * D3AMR / SRDAMR BKPRAM LL_CLKAM_Enable\n
  2983. * D3AMR / SRDAMR SRAM4 LL_CLKAM_Enable
  2984. * @param Periphs This parameter can be a combination of the following values:
  2985. * @arg @ref LL_CLKAM_PERIPH_BDMA
  2986. * @arg @ref LL_CLKAM_PERIPH_GPIO (*)
  2987. * @arg @ref LL_CLKAM_PERIPH_LPUART1
  2988. * @arg @ref LL_CLKAM_PERIPH_SPI6
  2989. * @arg @ref LL_CLKAM_PERIPH_I2C4
  2990. * @arg @ref LL_CLKAM_PERIPH_LPTIM2
  2991. * @arg @ref LL_CLKAM_PERIPH_LPTIM3
  2992. * @arg @ref LL_CLKAM_PERIPH_LPTIM4 (*)
  2993. * @arg @ref LL_CLKAM_PERIPH_LPTIM5 (*)
  2994. * @arg @ref LL_CLKAM_PERIPH_DAC2 (*)
  2995. * @arg @ref LL_CLKAM_PERIPH_COMP12
  2996. * @arg @ref LL_CLKAM_PERIPH_VREF
  2997. * @arg @ref LL_CLKAM_PERIPH_RTC
  2998. * @arg @ref LL_CLKAM_PERIPH_CRC (*)
  2999. * @arg @ref LL_CLKAM_PERIPH_SAI4 (*)
  3000. * @arg @ref LL_CLKAM_PERIPH_ADC3 (*)
  3001. * @arg @ref LL_CLKAM_PERIPH_DTS (*)
  3002. * @arg @ref LL_CLKAM_PERIPH_DFSDM2 (*)
  3003. * @arg @ref LL_CLKAM_PERIPH_BKPRAM
  3004. * @arg @ref LL_CLKAM_PERIPH_SRAM4
  3005. *
  3006. * (*) value not defined in all devices.
  3007. * @retval None
  3008. */
  3009. __STATIC_INLINE void LL_CLKAM_Enable(uint32_t Periphs)
  3010. {
  3011. __IO uint32_t tmpreg;
  3012. #if defined(RCC_D3AMR_BDMAAMEN)
  3013. SET_BIT(RCC->D3AMR, Periphs);
  3014. /* Delay after an RCC peripheral clock enabling */
  3015. tmpreg = READ_BIT(RCC->D3AMR, Periphs);
  3016. #else
  3017. SET_BIT(RCC->SRDAMR, Periphs);
  3018. /* Delay after an RCC peripheral clock enabling */
  3019. tmpreg = READ_BIT(RCC->SRDAMR, Periphs);
  3020. #endif /* RCC_D3AMR_BDMAAMEN */
  3021. (void)tmpreg;
  3022. }
  3023. /**
  3024. * @brief Disable peripherals clock for CLKAM Mode.
  3025. * @rmtoll D3AMR / SRDAMR BDMA LL_CLKAM_Disable\n
  3026. * D3AMR / SRDAMR LPUART1 LL_CLKAM_Disable\n
  3027. * D3AMR / SRDAMR SPI6 LL_CLKAM_Disable\n
  3028. * D3AMR / SRDAMR I2C4 LL_CLKAM_Disable\n
  3029. * D3AMR / SRDAMR LPTIM2 LL_CLKAM_Disable\n
  3030. * D3AMR / SRDAMR LPTIM3 LL_CLKAM_Disable\n
  3031. * D3AMR / SRDAMR LPTIM4 LL_CLKAM_Disable\n (*)
  3032. * D3AMR / SRDAMR LPTIM5 LL_CLKAM_Disable\n (*)
  3033. * D3AMR / SRDAMR DAC2 LL_CLKAM_Disable\n (*)
  3034. * D3AMR / SRDAMR COMP12 LL_CLKAM_Disable\n
  3035. * D3AMR / SRDAMR VREF LL_CLKAM_Disable\n
  3036. * D3AMR / SRDAMR RTC LL_CLKAM_Disable\n
  3037. * D3AMR / SRDAMR CRC LL_CLKAM_Disable\n
  3038. * D3AMR / SRDAMR SAI4 LL_CLKAM_Disable\n (*)
  3039. * D3AMR / SRDAMR ADC3 LL_CLKAM_Disable\n (*)
  3040. * D3AMR / SRDAMR DTS LL_CLKAM_Disable\n (*)
  3041. * D3AMR / SRDAMR DFSDM2 LL_CLKAM_Disable\n (*)
  3042. * D3AMR / SRDAMR BKPRAM LL_CLKAM_Disable\n
  3043. * D3AMR / SRDAMR SRAM4 LL_CLKAM_Disable
  3044. * @param Periphs This parameter can be a combination of the following values:
  3045. * @arg @ref LL_CLKAM_PERIPH_BDMA
  3046. * @arg @ref LL_CLKAM_PERIPH_GPIO (*)
  3047. * @arg @ref LL_CLKAM_PERIPH_LPUART1
  3048. * @arg @ref LL_CLKAM_PERIPH_SPI6
  3049. * @arg @ref LL_CLKAM_PERIPH_I2C4
  3050. * @arg @ref LL_CLKAM_PERIPH_LPTIM2
  3051. * @arg @ref LL_CLKAM_PERIPH_LPTIM3
  3052. * @arg @ref LL_CLKAM_PERIPH_LPTIM4 (*)
  3053. * @arg @ref LL_CLKAM_PERIPH_LPTIM5 (*)
  3054. * @arg @ref LL_CLKAM_PERIPH_DAC2 (*)
  3055. * @arg @ref LL_CLKAM_PERIPH_COMP12
  3056. * @arg @ref LL_CLKAM_PERIPH_VREF
  3057. * @arg @ref LL_CLKAM_PERIPH_RTC
  3058. * @arg @ref LL_CLKAM_PERIPH_CRC (*)
  3059. * @arg @ref LL_CLKAM_PERIPH_SAI4 (*)
  3060. * @arg @ref LL_CLKAM_PERIPH_ADC3 (*)
  3061. * @arg @ref LL_CLKAM_PERIPH_DTS (*)
  3062. * @arg @ref LL_CLKAM_PERIPH_DFSDM2 (*)
  3063. * @arg @ref LL_CLKAM_PERIPH_BKPRAM
  3064. * @arg @ref LL_CLKAM_PERIPH_SRAM4
  3065. *
  3066. * (*) value not defined in all devices.
  3067. * @retval None
  3068. */
  3069. __STATIC_INLINE void LL_CLKAM_Disable(uint32_t Periphs)
  3070. {
  3071. #if defined(RCC_D3AMR_BDMAAMEN)
  3072. CLEAR_BIT(RCC->D3AMR, Periphs);
  3073. #else
  3074. CLEAR_BIT(RCC->SRDAMR, Periphs);
  3075. #endif /* RCC_D3AMR_BDMAAMEN */
  3076. }
  3077. /**
  3078. * @}
  3079. */
  3080. /** @defgroup BUS_LL_EF_CKGA CKGA
  3081. * @{
  3082. */
  3083. #if defined(RCC_CKGAENR_AXICKG)
  3084. /**
  3085. * @brief Enable clock gating for AXI bus peripherals.
  3086. * @rmtoll CKGAENR AXICKG LL_CKGA_Enable\n
  3087. * CKGAENR AHBCKG LL_CKGA_Enable\n
  3088. * CKGAENR CPUCKG LL_CKGA_Enable\n
  3089. * CKGAENR SDMMCCKG LL_CKGA_Enable\n
  3090. * CKGAENR MDMACKG LL_CKGA_Enable\n
  3091. * CKGAENR DMA2DCKG LL_CKGA_Enable\n
  3092. * CKGAENR LTDCCKG LL_CKGA_Enable\n
  3093. * CKGAENR GFXMMUMCKG LL_CKGA_Enable\n
  3094. * CKGAENR AHB12CKG LL_CKGA_Enable\n
  3095. * CKGAENR AHB34CKG LL_CKGA_Enable\n
  3096. * CKGAENR FLIFTCKG LL_CKGA_Enable\n
  3097. * CKGAENR OCTOSPI2CKG LL_CKGA_Enable\n
  3098. * CKGAENR FMCCKG LL_CKGA_Enable\n
  3099. * CKGAENR OCTOSPI1CKG LL_CKGA_Enable\n
  3100. * CKGAENR AXIRAM1CKG LL_CKGA_Enable\n
  3101. * CKGAENR AXIRAM2CKG LL_CKGA_Enable\n
  3102. * CKGAENR AXIRAM3CKG LL_CKGA_Enable\n
  3103. * CKGAENR GFXMMUSCKG LL_CKGA_Enable\n
  3104. * CKGAENR ECCRAMCKG LL_CKGA_Enable\n
  3105. * CKGAENR EXTICKG LL_CKGA_Enable\n
  3106. * CKGAENR JTAGCKG LL_CKGA_Enable
  3107. * @param Periphs This parameter can be a combination of the following values:
  3108. * @arg @ref LL_CKGA_PERIPH_AXI
  3109. * @arg @ref LL_CKGA_PERIPH_AHB
  3110. * @arg @ref LL_CKGA_PERIPH_CPU
  3111. * @arg @ref LL_CKGA_PERIPH_SDMMC
  3112. * @arg @ref LL_CKGA_PERIPH_MDMA
  3113. * @arg @ref LL_CKGA_PERIPH_DMA2D
  3114. * @arg @ref LL_CKGA_PERIPH_LTDC
  3115. * @arg @ref LL_CKGA_PERIPH_GFXMMUM
  3116. * @arg @ref LL_CKGA_PERIPH_AHB12
  3117. * @arg @ref LL_CKGA_PERIPH_AHB34
  3118. * @arg @ref LL_CKGA_PERIPH_FLIFT
  3119. * @arg @ref LL_CKGA_PERIPH_OCTOSPI2
  3120. * @arg @ref LL_CKGA_PERIPH_FMC
  3121. * @arg @ref LL_CKGA_PERIPH_OCTOSPI1
  3122. * @arg @ref LL_CKGA_PERIPH_AXIRAM1
  3123. * @arg @ref LL_CKGA_PERIPH_AXIRAM2
  3124. * @arg @ref LL_CKGA_PERIPH_AXIRAM3
  3125. * @arg @ref LL_CKGA_PERIPH_GFXMMUS
  3126. * @arg @ref LL_CKGA_PERIPH_ECCRAM
  3127. * @arg @ref LL_CKGA_PERIPH_EXTI
  3128. * @arg @ref LL_CKGA_PERIPH_JTAG
  3129. * @retval None
  3130. */
  3131. __STATIC_INLINE void LL_CKGA_Enable(uint32_t Periphs)
  3132. {
  3133. __IO uint32_t tmpreg;
  3134. SET_BIT(RCC->CKGAENR, Periphs);
  3135. /* Delay after an RCC peripheral clock enabling */
  3136. tmpreg = READ_BIT(RCC->CKGAENR, Periphs);
  3137. (void)tmpreg;
  3138. }
  3139. #endif /* RCC_CKGAENR_AXICKG */
  3140. #if defined(RCC_CKGAENR_AXICKG)
  3141. /**
  3142. * @brief Disable clock gating for AXI bus peripherals.
  3143. * @rmtoll CKGAENR AXICKG LL_CKGA_Enable\n
  3144. * CKGAENR AHBCKG LL_CKGA_Enable\n
  3145. * CKGAENR CPUCKG LL_CKGA_Enable\n
  3146. * CKGAENR SDMMCCKG LL_CKGA_Enable\n
  3147. * CKGAENR MDMACKG LL_CKGA_Enable\n
  3148. * CKGAENR DMA2DCKG LL_CKGA_Enable\n
  3149. * CKGAENR LTDCCKG LL_CKGA_Enable\n
  3150. * CKGAENR GFXMMUMCKG LL_CKGA_Enable\n
  3151. * CKGAENR AHB12CKG LL_CKGA_Enable\n
  3152. * CKGAENR AHB34CKG LL_CKGA_Enable\n
  3153. * CKGAENR FLIFTCKG LL_CKGA_Enable\n
  3154. * CKGAENR OCTOSPI2CKG LL_CKGA_Enable\n
  3155. * CKGAENR FMCCKG LL_CKGA_Enable\n
  3156. * CKGAENR OCTOSPI1CKG LL_CKGA_Enable\n
  3157. * CKGAENR AXIRAM1CKG LL_CKGA_Enable\n
  3158. * CKGAENR AXIRAM2CKG LL_CKGA_Enable\n
  3159. * CKGAENR AXIRAM3CKG LL_CKGA_Enable\n
  3160. * CKGAENR GFXMMUSCKG LL_CKGA_Enable\n
  3161. * CKGAENR ECCRAMCKG LL_CKGA_Enable\n
  3162. * CKGAENR EXTICKG LL_CKGA_Enable\n
  3163. * CKGAENR JTAGCKG LL_CKGA_Enable
  3164. * @param Periphs This parameter can be a combination of the following values:
  3165. * @arg @ref LL_CKGA_PERIPH_AXI
  3166. * @arg @ref LL_CKGA_PERIPH_AHB
  3167. * @arg @ref LL_CKGA_PERIPH_CPU
  3168. * @arg @ref LL_CKGA_PERIPH_SDMMC
  3169. * @arg @ref LL_CKGA_PERIPH_MDMA
  3170. * @arg @ref LL_CKGA_PERIPH_DMA2D
  3171. * @arg @ref LL_CKGA_PERIPH_LTDC
  3172. * @arg @ref LL_CKGA_PERIPH_GFXMMUM
  3173. * @arg @ref LL_CKGA_PERIPH_AHB12
  3174. * @arg @ref LL_CKGA_PERIPH_AHB34
  3175. * @arg @ref LL_CKGA_PERIPH_FLIFT
  3176. * @arg @ref LL_CKGA_PERIPH_OCTOSPI2
  3177. * @arg @ref LL_CKGA_PERIPH_FMC
  3178. * @arg @ref LL_CKGA_PERIPH_OCTOSPI1
  3179. * @arg @ref LL_CKGA_PERIPH_AXIRAM1
  3180. * @arg @ref LL_CKGA_PERIPH_AXIRAM2
  3181. * @arg @ref LL_CKGA_PERIPH_AXIRAM3
  3182. * @arg @ref LL_CKGA_PERIPH_GFXMMUS
  3183. * @arg @ref LL_CKGA_PERIPH_ECCRAM
  3184. * @arg @ref LL_CKGA_PERIPH_EXTI
  3185. * @arg @ref LL_CKGA_PERIPH_JTAG
  3186. * @retval None
  3187. */
  3188. __STATIC_INLINE void LL_CKGA_Disable(uint32_t Periphs)
  3189. {
  3190. CLEAR_BIT(RCC->CKGAENR, Periphs);
  3191. }
  3192. #endif /* RCC_CKGAENR_AXICKG */
  3193. /**
  3194. * @}
  3195. */
  3196. #if defined(DUAL_CORE)
  3197. /** @addtogroup BUS_LL_EF_AHB3 AHB3
  3198. * @{
  3199. */
  3200. /**
  3201. * @brief Enable C1 AHB3 peripherals clock.
  3202. * @rmtoll AHB3ENR MDMAEN LL_C1_AHB3_GRP1_EnableClock\n
  3203. * AHB3ENR DMA2DEN LL_C1_AHB3_GRP1_EnableClock\n
  3204. * AHB3ENR JPGDECEN LL_C1_AHB3_GRP1_EnableClock\n
  3205. * AHB3ENR FMCEN LL_C1_AHB3_GRP1_EnableClock\n
  3206. * AHB3ENR QSPIEN LL_C1_AHB3_GRP1_EnableClock\n (*)
  3207. * AHB3ENR OSPI1EN LL_C1_AHB3_GRP1_EnableClock\n (*)
  3208. * AHB3ENR OSPI2EN LL_C1_AHB3_GRP1_EnableClock\n (*)
  3209. * AHB3ENR IOMNGREN LL_C1_AHB3_GRP1_EnableClock\n (*)
  3210. * AHB3ENR OTFDEC1EN LL_C1_AHB3_GRP1_EnableClock\n (*)
  3211. * AHB3ENR OTFDEC2EN LL_C1_AHB3_GRP1_EnableClock\n (*)
  3212. * AHB3ENR GFXMMUEN LL_C1_AHB3_GRP1_EnableClock\n (*)
  3213. * AHB3ENR SDMMC1EN LL_C1_AHB3_GRP1_EnableClock
  3214. * @param Periphs This parameter can be a combination of the following values:
  3215. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  3216. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  3217. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC
  3218. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  3219. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  3220. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  3221. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  3222. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  3223. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  3224. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  3225. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  3226. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  3227. *
  3228. * (*) value not defined in all devices.
  3229. * @retval None
  3230. */
  3231. __STATIC_INLINE void LL_C1_AHB3_GRP1_EnableClock(uint32_t Periphs)
  3232. {
  3233. __IO uint32_t tmpreg;
  3234. SET_BIT(RCC_C1->AHB3ENR, Periphs);
  3235. /* Delay after an RCC peripheral clock enabling */
  3236. tmpreg = READ_BIT(RCC_C1->AHB3ENR, Periphs);
  3237. (void)tmpreg;
  3238. }
  3239. /**
  3240. * @brief Check if C1 AHB3 peripheral clock is enabled or not
  3241. * @rmtoll AHB3ENR MDMAEN LL_C1_AHB3_GRP1_IsEnabledClock\n
  3242. * AHB3ENR DMA2DEN LL_C1_AHB3_GRP1_IsEnabledClock\n
  3243. * AHB3ENR JPGDECEN LL_C1_AHB3_GRP1_IsEnabledClock\n
  3244. * AHB3ENR FMCEN LL_C1_AHB3_GRP1_IsEnabledClock\n
  3245. * AHB3ENR QSPIEN LL_C1_AHB3_GRP1_IsEnabledClock\n (*)
  3246. * AHB3ENR OSPI1EN LL_C1_AHB3_GRP1_IsEnabledClock\n (*)
  3247. * AHB3ENR OSPI2EN LL_C1_AHB3_GRP1_IsEnabledClock\n (*)
  3248. * AHB3ENR IOMNGREN LL_C1_AHB3_GRP1_IsEnabledClock\n (*)
  3249. * AHB3ENR OTFDEC1EN LL_C1_AHB3_GRP1_IsEnabledClock\n (*)
  3250. * AHB3ENR OTFDEC2EN LL_C1_AHB3_GRP1_IsEnabledClock\n (*)
  3251. * AHB3ENR GFXMMUEN LL_C1_AHB3_GRP1_IsEnabledClock\n (*)
  3252. * AHB3ENR SDMMC1EN LL_C1_AHB3_GRP1_IsEnabledClock
  3253. * @param Periphs This parameter can be a combination of the following values:
  3254. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  3255. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  3256. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC
  3257. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  3258. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  3259. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  3260. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  3261. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  3262. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  3263. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  3264. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  3265. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  3266. *
  3267. * (*) value not defined in all devices.
  3268. * @retval uint32_t
  3269. */
  3270. __STATIC_INLINE uint32_t LL_C1_AHB3_GRP1_IsEnabledClock(uint32_t Periphs)
  3271. {
  3272. return ((READ_BIT(RCC_C1->AHB3ENR, Periphs) == Periphs) ? 1U : 0U);
  3273. }
  3274. /**
  3275. * @brief Disable C1 AHB3 peripherals clock.
  3276. * @rmtoll AHB3ENR MDMAEN LL_C1_AHB3_GRP1_DisableClock\n
  3277. * AHB3ENR DMA2DEN LL_C1_AHB3_GRP1_DisableClock\n
  3278. * AHB3ENR JPGDECEN LL_C1_AHB3_GRP1_DisableClock\n
  3279. * AHB3ENR FMCEN LL_C1_AHB3_GRP1_DisableClock\n
  3280. * AHB3ENR QSPIEN LL_C1_AHB3_GRP1_DisableClock\n (*)
  3281. * AHB3ENR OSPI1EN LL_C1_AHB3_GRP1_DisableClock\n (*)
  3282. * AHB3ENR OSPI2EN LL_C1_AHB3_GRP1_DisableClock\n (*)
  3283. * AHB3ENR IOMNGREN LL_C1_AHB3_GRP1_DisableClock\n (*)
  3284. * AHB3ENR OTFDEC1EN LL_C1_AHB3_GRP1_DisableClock\n (*)
  3285. * AHB3ENR OTFDEC2EN LL_C1_AHB3_GRP1_DisableClock\n (*)
  3286. * AHB3ENR GFXMMUEN LL_C1_AHB3_GRP1_DisableClock\n (*)
  3287. * AHB3ENR SDMMC1EN LL_C1_AHB3_GRP1_DisableClock
  3288. * @param Periphs This parameter can be a combination of the following values:
  3289. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  3290. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  3291. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  3292. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  3293. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  3294. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  3295. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  3296. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  3297. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  3298. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  3299. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  3300. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  3301. *
  3302. * (*) value not defined in all devices.
  3303. * @retval None
  3304. */
  3305. __STATIC_INLINE void LL_C1_AHB3_GRP1_DisableClock(uint32_t Periphs)
  3306. {
  3307. CLEAR_BIT(RCC_C1->AHB3ENR, Periphs);
  3308. }
  3309. /**
  3310. * @brief Enable C1 AHB3 peripherals clock during Low Power (Sleep) mode.
  3311. * @rmtoll AHB3LPENR MDMALPEN LL_C1_AHB3_GRP1_EnableClockSleep\n
  3312. * AHB3LPENR DMA2DLPEN LL_C1_AHB3_GRP1_EnableClockSleep\n
  3313. * AHB3LPENR JPGDECLPEN LL_C1_AHB3_GRP1_EnableClockSleep\n
  3314. * AHB3LPENR FMCLPEN LL_C1_AHB3_GRP1_EnableClockSleep\n
  3315. * AHB3LPENR QSPILPEN LL_C1_AHB3_GRP1_EnableClockSleep\n (*)
  3316. * AHB3LPENR OSPI1LPEN LL_C1_AHB3_GRP1_EnableClockSleep\n (*)
  3317. * AHB3LPENR OSPI2LPEN LL_C1_AHB3_GRP1_EnableClockSleep\n (*)
  3318. * AHB3LPENR IOMNGRLPEN LL_C1_AHB3_GRP1_EnableClockSleep\n (*)
  3319. * AHB3LPENR OTFDEC1LPEN LL_C1_AHB3_GRP1_EnableClockSleep\n (*)
  3320. * AHB3LPENR OTFDEC1LPEN LL_C1_AHB3_GRP1_EnableClockSleep\n (*)
  3321. * AHB3LPENR GFXMMULPEN LL_C1_AHB3_GRP1_EnableClockSleep\n (*)
  3322. * AHB3LPENR SDMMC1LPEN LL_C1_AHB3_GRP1_EnableClockSleep\n
  3323. * AHB3LPENR FLASHLPEN LL_C1_AHB3_GRP1_EnableClockSleep\n
  3324. * AHB3LPENR DTCM1LPEN LL_C1_AHB3_GRP1_EnableClockSleep\n
  3325. * AHB3LPENR DTCM2LPEN LL_C1_AHB3_GRP1_EnableClockSleep\n
  3326. * AHB3LPENR ITCMLPEN LL_C1_AHB3_GRP1_EnableClockSleep\n
  3327. * AHB3LPENR AXISRAMLPEN LL_C1_AHB3_GRP1_EnableClockSleep
  3328. * @param Periphs This parameter can be a combination of the following values:
  3329. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  3330. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  3331. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  3332. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  3333. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  3334. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  3335. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  3336. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  3337. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  3338. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  3339. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  3340. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH
  3341. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1
  3342. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2
  3343. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM
  3344. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  3345. *
  3346. * (*) value not defined in all devices.
  3347. * @retval None
  3348. */
  3349. __STATIC_INLINE void LL_C1_AHB3_GRP1_EnableClockSleep(uint32_t Periphs)
  3350. {
  3351. __IO uint32_t tmpreg;
  3352. SET_BIT(RCC_C1->AHB3LPENR, Periphs);
  3353. /* Delay after an RCC peripheral clock enabling */
  3354. tmpreg = READ_BIT(RCC_C1->AHB3LPENR, Periphs);
  3355. (void)tmpreg;
  3356. }
  3357. /**
  3358. * @brief Disable C1 AHB3 peripherals clock during Low Power (Sleep) mode.
  3359. * @rmtoll AHB3LPENR MDMALPEN LL_C1_AHB3_GRP1_DisableClockSleep\n
  3360. * AHB3LPENR DMA2DLPEN LL_C1_AHB3_GRP1_DisableClockSleep\n
  3361. * AHB3LPENR JPGDECLPEN LL_C1_AHB3_GRP1_DisableClockSleep\n
  3362. * AHB3LPENR FMCLPEN LL_C1_AHB3_GRP1_DisableClockSleep\n
  3363. * AHB3LPENR QSPILPEN LL_C1_AHB3_GRP1_DisableClockSleep\n (*)
  3364. * AHB3LPENR OSPI1LPEN LL_C1_AHB3_GRP1_DisableClockSleep\n (*)
  3365. * AHB3LPENR OSPI2LPEN LL_C1_AHB3_GRP1_DisableClockSleep\n (*)
  3366. * AHB3LPENR IOMNGRLPEN LL_C1_AHB3_GRP1_DisableClockSleep\n (*)
  3367. * AHB3LPENR OTFDEC1LPEN LL_C1_AHB3_GRP1_DisableClockSleep\n (*)
  3368. * AHB3LPENR OTFDEC1LPEN LL_C1_AHB3_GRP1_DisableClockSleep\n (*)
  3369. * AHB3LPENR GFXMMULPEN LL_C1_AHB3_GRP1_DisableClockSleep\n (*)
  3370. * AHB3LPENR SDMMC1LPEN LL_C1_AHB3_GRP1_DisableClockSleep\n
  3371. * AHB3LPENR FLASHLPEN LL_C1_AHB3_GRP1_DisableClockSleep\n
  3372. * AHB3LPENR DTCM1LPEN LL_C1_AHB3_GRP1_DisableClockSleep\n
  3373. * AHB3LPENR DTCM2LPEN LL_C1_AHB3_GRP1_DisableClockSleep\n
  3374. * AHB3LPENR ITCMLPEN LL_C1_AHB3_GRP1_DisableClockSleep\n
  3375. * AHB3LPENR AXISRAMLPEN LL_C1_AHB3_GRP1_DisableClockSleep
  3376. * @param Periphs This parameter can be a combination of the following values:
  3377. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  3378. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  3379. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  3380. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  3381. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI1 (*)
  3382. * @arg @ref LL_AHB3_GRP1_PERIPH_OSPI2 (*)
  3383. * @arg @ref LL_AHB3_GRP1_PERIPH_OCTOSPIM (*)
  3384. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC1 (*)
  3385. * @arg @ref LL_AHB3_GRP1_PERIPH_OTFDEC2 (*)
  3386. * @arg @ref LL_AHB3_GRP1_PERIPH_GFXMMU (*)
  3387. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  3388. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH
  3389. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1
  3390. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2
  3391. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM
  3392. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  3393. *
  3394. * (*) value not defined in all devices.
  3395. * @retval None
  3396. */
  3397. __STATIC_INLINE void LL_C1_AHB3_GRP1_DisableClockSleep(uint32_t Periphs)
  3398. {
  3399. CLEAR_BIT(RCC_C1->AHB3LPENR, Periphs);
  3400. }
  3401. /**
  3402. * @}
  3403. */
  3404. /** @addtogroup BUS_LL_EF_AHB1 AHB1
  3405. * @{
  3406. */
  3407. /**
  3408. * @brief Enable C1 AHB1 peripherals clock.
  3409. * @rmtoll AHB1ENR DMA1EN LL_C1_AHB1_GRP1_EnableClock\n
  3410. * AHB1ENR DMA2EN LL_C1_AHB1_GRP1_EnableClock\n
  3411. * AHB1ENR ADC12EN LL_C1_AHB1_GRP1_EnableClock\n
  3412. * AHB1ENR CRCEN LL_C1_AHB1_GRP1_EnableClock\n (*)
  3413. * AHB1ENR ARTEN LL_C1_AHB1_GRP1_EnableClock\n (*)
  3414. * AHB1ENR ETH1MACEN LL_C1_AHB1_GRP1_EnableClock\n (*)
  3415. * AHB1ENR ETH1TXEN LL_C1_AHB1_GRP1_EnableClock\n (*)
  3416. * AHB1ENR ETH1RXEN LL_C1_AHB1_GRP1_EnableClock\n (*)
  3417. * AHB1ENR USB1OTGHSEN LL_C1_AHB1_GRP1_EnableClock\n
  3418. * AHB1ENR USB1OTGHSULPIEN LL_C1_AHB1_GRP1_EnableClock\n
  3419. * AHB1ENR USB2OTGHSEN LL_C1_AHB1_GRP1_EnableClock\n (*)
  3420. * AHB1ENR USB2OTGHSULPIEN LL_C1_AHB1_GRP1_EnableClock (*)
  3421. * @param Periphs This parameter can be a combination of the following values:
  3422. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  3423. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  3424. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  3425. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  3426. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  3427. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  3428. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  3429. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  3430. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  3431. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  3432. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  3433. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  3434. *
  3435. * (*) value not defined in all devices.
  3436. * @retval None
  3437. */
  3438. __STATIC_INLINE void LL_C1_AHB1_GRP1_EnableClock(uint32_t Periphs)
  3439. {
  3440. __IO uint32_t tmpreg;
  3441. SET_BIT(RCC_C1->AHB1ENR, Periphs);
  3442. /* Delay after an RCC peripheral clock enabling */
  3443. tmpreg = READ_BIT(RCC_C1->AHB1ENR, Periphs);
  3444. (void)tmpreg;
  3445. }
  3446. /**
  3447. * @brief Check if C1 AHB1 peripheral clock is enabled or not
  3448. * @rmtoll AHB1ENR DMA1EN LL_C1_AHB1_GRP1_IsEnabledClock\n
  3449. * AHB1ENR DMA2EN LL_C1_AHB1_GRP1_IsEnabledClock\n
  3450. * AHB1ENR ADC12EN LL_C1_AHB1_GRP1_IsEnabledClock\n
  3451. * AHB1ENR CRCEN LL_C1_AHB1_GRP1_IsEnabledClock\n (*)
  3452. * AHB1ENR ARTEN LL_C1_AHB1_GRP1_IsEnabledClock\n (*)
  3453. * AHB1ENR ETH1MACEN LL_C1_AHB1_GRP1_IsEnabledClock\n (*)
  3454. * AHB1ENR ETH1TXEN LL_C1_AHB1_GRP1_IsEnabledClock\n (*)
  3455. * AHB1ENR ETH1RXEN LL_C1_AHB1_GRP1_IsEnabledClock\n (*)
  3456. * AHB1ENR USB1OTGHSEN LL_C1_AHB1_GRP1_IsEnabledClock\n
  3457. * AHB1ENR USB1OTGHSULPIEN LL_C1_AHB1_GRP1_IsEnabledClock\n
  3458. * AHB1ENR USB2OTGHSEN LL_C1_AHB1_GRP1_IsEnabledClock\n (*)
  3459. * AHB1ENR USB2OTGHSULPIEN LL_C1_AHB1_GRP1_IsEnabledClock (*)
  3460. * @param Periphs This parameter can be a combination of the following values:
  3461. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  3462. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  3463. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  3464. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  3465. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  3466. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  3467. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  3468. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  3469. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  3470. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  3471. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  3472. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  3473. *
  3474. * (*) value not defined in all devices.
  3475. * @retval uint32_t
  3476. */
  3477. __STATIC_INLINE uint32_t LL_C1_AHB1_GRP1_IsEnabledClock(uint32_t Periphs)
  3478. {
  3479. return ((READ_BIT(RCC_C1->AHB1ENR, Periphs) == Periphs) ? 1U : 0U);
  3480. }
  3481. /**
  3482. * @brief Disable C1 AHB1 peripherals clock.
  3483. * @rmtoll AHB1ENR DMA1EN LL_C1_AHB1_GRP1_DisableClock\n
  3484. * AHB1ENR DMA2EN LL_C1_AHB1_GRP1_DisableClock\n
  3485. * AHB1ENR ADC12EN LL_C1_AHB1_GRP1_DisableClock\n
  3486. * AHB1ENR CRCEN LL_C1_AHB1_GRP1_DisableClock\n (*)
  3487. * AHB1ENR ARTEN LL_C1_AHB1_GRP1_DisableClock\n (*)
  3488. * AHB1ENR ETH1MACEN LL_C1_AHB1_GRP1_DisableClock\n (*)
  3489. * AHB1ENR ETH1TXEN LL_C1_AHB1_GRP1_DisableClock\n (*)
  3490. * AHB1ENR ETH1RXEN LL_C1_AHB1_GRP1_DisableClock\n (*)
  3491. * AHB1ENR USB1OTGHSEN LL_C1_AHB1_GRP1_DisableClock\n
  3492. * AHB1ENR USB1OTGHSULPIEN LL_C1_AHB1_GRP1_DisableClock\n
  3493. * AHB1ENR USB2OTGHSEN LL_C1_AHB1_GRP1_DisableClock\n (*)
  3494. * AHB1ENR USB2OTGHSULPIEN LL_C1_AHB1_GRP1_DisableClock (*)
  3495. * @param Periphs This parameter can be a combination of the following values:
  3496. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  3497. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  3498. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  3499. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  3500. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  3501. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  3502. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  3503. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  3504. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  3505. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  3506. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  3507. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  3508. *
  3509. * (*) value not defined in all devices.
  3510. * @retval None
  3511. */
  3512. __STATIC_INLINE void LL_C1_AHB1_GRP1_DisableClock(uint32_t Periphs)
  3513. {
  3514. CLEAR_BIT(RCC_C1->AHB1ENR, Periphs);
  3515. }
  3516. /**
  3517. * @brief Enable C1 AHB1 peripherals clock during Low Power (Sleep) mode.
  3518. * @rmtoll AHB1LPENR DMA1LPEN LL_C1_AHB1_GRP1_EnableClockSleep\n
  3519. * AHB1LPENR DMA2LPEN LL_C1_AHB1_GRP1_EnableClockSleep\n
  3520. * AHB1LPENR ADC12LPEN LL_C1_AHB1_GRP1_EnableClockSleep\n
  3521. * AHB1LPENR CRCLPEN LL_C1_AHB1_GRP1_EnableClockSleep\n (*)
  3522. * AHB1LPENR ARTLPEN LL_C1_AHB1_GRP1_EnableClockSleep\n (*)
  3523. * AHB1LPENR ETH1MACLPEN LL_C1_AHB1_GRP1_EnableClockSleep\n (*)
  3524. * AHB1LPENR ETH1TXLPEN LL_C1_AHB1_GRP1_EnableClockSleep\n (*)
  3525. * AHB1LPENR ETH1RXLPEN LL_C1_AHB1_GRP1_EnableClockSleep\n (*)
  3526. * AHB1LPENR USB1OTGHSLPEN LL_C1_AHB1_GRP1_EnableClockSleep\n
  3527. * AHB1LPENR USB1OTGHSULPILPEN LL_C1_AHB1_GRP1_EnableClockSleep\n
  3528. * AHB1LPENR USB2OTGHSLPEN LL_C1_AHB1_GRP1_EnableClockSleep\n (*)
  3529. * AHB1LPENR USB2OTGHSULPILPEN LL_C1_AHB1_GRP1_EnableClockSleep (*)
  3530. * @param Periphs This parameter can be a combination of the following values:
  3531. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  3532. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  3533. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  3534. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  3535. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  3536. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  3537. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  3538. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  3539. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  3540. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  3541. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  3542. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  3543. *
  3544. * (*) value not defined in all devices.
  3545. * @retval None
  3546. */
  3547. __STATIC_INLINE void LL_C1_AHB1_GRP1_EnableClockSleep(uint32_t Periphs)
  3548. {
  3549. __IO uint32_t tmpreg;
  3550. SET_BIT(RCC_C1->AHB1LPENR, Periphs);
  3551. /* Delay after an RCC peripheral clock enabling */
  3552. tmpreg = READ_BIT(RCC_C1->AHB1LPENR, Periphs);
  3553. (void)tmpreg;
  3554. }
  3555. /**
  3556. * @brief Disable C1 AHB1 peripherals clock during Low Power (Sleep) mode.
  3557. * @rmtoll AHB1LPENR DMA1LPEN LL_C1_AHB1_GRP1_DisableClockSleep\n
  3558. * AHB1LPENR DMA2LPEN LL_C1_AHB1_GRP1_DisableClockSleep\n
  3559. * AHB1LPENR ADC12LPEN LL_C1_AHB1_GRP1_DisableClockSleep\n
  3560. * AHB1LPENR CRCLPEN LL_C1_AHB1_GRP1_DisableClockSleep\n (*)
  3561. * AHB1LPENR ARTLPEN LL_C1_AHB1_GRP1_DisableClockSleep\n (*)
  3562. * AHB1LPENR ETH1MACLPEN LL_C1_AHB1_GRP1_DisableClockSleep\n (*)
  3563. * AHB1LPENR ETH1TXLPEN LL_C1_AHB1_GRP1_DisableClockSleep\n (*)
  3564. * AHB1LPENR ETH1RXLPEN LL_C1_AHB1_GRP1_DisableClockSleep\n (*)
  3565. * AHB1LPENR USB1OTGHSLPEN LL_C1_AHB1_GRP1_DisableClockSleep\n
  3566. * AHB1LPENR USB1OTGHSULPILPEN LL_C1_AHB1_GRP1_DisableClockSleep\n
  3567. * AHB1LPENR USB2OTGHSLPEN LL_C1_AHB1_GRP1_DisableClockSleep\n (*)
  3568. * AHB1LPENR USB2OTGHSULPILPEN LL_C1_AHB1_GRP1_DisableClockSleep (*)
  3569. * @param Periphs This parameter can be a combination of the following values:
  3570. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  3571. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  3572. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  3573. * @arg @ref LL_AHB1_GRP1_PERIPH_CRC (*)
  3574. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  3575. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  3576. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  3577. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  3578. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  3579. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  3580. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  3581. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  3582. *
  3583. * (*) value not defined in all devices.
  3584. * @retval None
  3585. */
  3586. __STATIC_INLINE void LL_C1_AHB1_GRP1_DisableClockSleep(uint32_t Periphs)
  3587. {
  3588. CLEAR_BIT(RCC_C1->AHB1LPENR, Periphs);
  3589. }
  3590. /**
  3591. * @}
  3592. */
  3593. /** @addtogroup BUS_LL_EF_AHB2 AHB2
  3594. * @{
  3595. */
  3596. /**
  3597. * @brief Enable C1 AHB2 peripherals clock.
  3598. * @rmtoll AHB2ENR DCMIEN LL_C1_AHB2_GRP1_EnableClock\n
  3599. * AHB2ENR HSEMEN LL_C1_AHB2_GRP1_EnableClock\n (*)
  3600. * AHB2ENR CRYPEN LL_C1_AHB2_GRP1_EnableClock\n (*)
  3601. * AHB2ENR HASHEN LL_C1_AHB2_GRP1_EnableClock\n (*)
  3602. * AHB2ENR RNGEN LL_C1_AHB2_GRP1_EnableClock\n
  3603. * AHB2ENR SDMMC2EN LL_C1_AHB2_GRP1_EnableClock\n
  3604. * AHB2ENR BDMA1EN LL_C1_AHB2_GRP1_EnableClock\n (*)
  3605. * AHB2ENR D2SRAM1EN LL_C1_AHB2_GRP1_EnableClock\n
  3606. * AHB2ENR D2SRAM2EN LL_C1_AHB2_GRP1_EnableClock\n
  3607. * AHB2ENR D2SRAM3EN LL_C1_AHB2_GRP1_EnableClock (*)
  3608. * @param Periphs This parameter can be a combination of the following values:
  3609. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  3610. * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*)
  3611. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  3612. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  3613. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  3614. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  3615. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  3616. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  3617. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  3618. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  3619. *
  3620. * (*) value not defined in all devices.
  3621. * @retval None
  3622. */
  3623. __STATIC_INLINE void LL_C1_AHB2_GRP1_EnableClock(uint32_t Periphs)
  3624. {
  3625. __IO uint32_t tmpreg;
  3626. SET_BIT(RCC_C1->AHB2ENR, Periphs);
  3627. /* Delay after an RCC peripheral clock enabling */
  3628. tmpreg = READ_BIT(RCC_C1->AHB2ENR, Periphs);
  3629. (void)tmpreg;
  3630. }
  3631. /**
  3632. * @brief Check if C1 AHB2 peripheral clock is enabled or not
  3633. * @rmtoll AHB2ENR DCMIEN LL_C1_AHB2_GRP1_IsEnabledClock\n
  3634. * AHB2ENR HSEMEN LL_C1_AHB2_GRP1_IsEnabledClock\n (*)
  3635. * AHB2ENR CRYPEN LL_C1_AHB2_GRP1_IsEnabledClock\n (*)
  3636. * AHB2ENR HASHEN LL_C1_AHB2_GRP1_IsEnabledClock\n (*)
  3637. * AHB2ENR RNGEN LL_C1_AHB2_GRP1_IsEnabledClock\n
  3638. * AHB2ENR SDMMC2EN LL_C1_AHB2_GRP1_IsEnabledClock\n
  3639. * AHB2ENR BDMA1EN LL_C1_AHB2_GRP1_IsEnabledClock\n (*)
  3640. * AHB2ENR D2SRAM1EN LL_C1_AHB2_GRP1_IsEnabledClock\n
  3641. * AHB2ENR D2SRAM2EN LL_C1_AHB2_GRP1_IsEnabledClock\n
  3642. * AHB2ENR D2SRAM3EN LL_C1_AHB2_GRP1_IsEnabledClock (*)
  3643. * @param Periphs This parameter can be a combination of the following values:
  3644. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  3645. * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*)
  3646. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  3647. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  3648. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  3649. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  3650. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  3651. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  3652. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  3653. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  3654. *
  3655. * (*) value not defined in all devices.
  3656. * @retval uint32_t
  3657. */
  3658. __STATIC_INLINE uint32_t LL_C1_AHB2_GRP1_IsEnabledClock(uint32_t Periphs)
  3659. {
  3660. return ((READ_BIT(RCC_C1->AHB2ENR, Periphs) == Periphs) ? 1U : 0U);
  3661. }
  3662. /**
  3663. * @brief Disable C1 AHB2 peripherals clock.
  3664. * @rmtoll AHB2ENR DCMIEN LL_C1_AHB2_GRP1_DisableClock\n
  3665. * AHB2ENR HSEMEN LL_C1_AHB2_GRP1_DisableClock\n (*)
  3666. * AHB2ENR CRYPEN LL_C1_AHB2_GRP1_DisableClock\n (*)
  3667. * AHB2ENR HASHEN LL_C1_AHB2_GRP1_DisableClock\n (*)
  3668. * AHB2ENR RNGEN LL_C1_AHB2_GRP1_DisableClock\n
  3669. * AHB2ENR SDMMC2EN LL_C1_AHB2_GRP1_DisableClock\n
  3670. * AHB2ENR BDMA1EN LL_C1_AHB2_GRP1_DisableClock\n (*)
  3671. * AHB2ENR D2SRAM1EN LL_C1_AHB2_GRP1_DisableClock\n
  3672. * AHB2ENR D2SRAM2EN LL_C1_AHB2_GRP1_DisableClock\n
  3673. * AHB2ENR D2SRAM3EN LL_C1_AHB2_GRP1_DisableClock (*)
  3674. * @param Periphs This parameter can be a combination of the following values:
  3675. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  3676. * @arg @ref LL_AHB2_GRP1_PERIPH_HSEM (*)
  3677. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  3678. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  3679. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  3680. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  3681. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  3682. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  3683. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  3684. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  3685. *
  3686. * (*) value not defined in all devices.
  3687. * @retval None
  3688. */
  3689. __STATIC_INLINE void LL_C1_AHB2_GRP1_DisableClock(uint32_t Periphs)
  3690. {
  3691. CLEAR_BIT(RCC_C1->AHB2ENR, Periphs);
  3692. }
  3693. /**
  3694. * @brief Enable C1 AHB2 peripherals clock during Low Power (Sleep) mode.
  3695. * @rmtoll AHB2LPENR DCMILPEN LL_C1_AHB2_GRP1_EnableClockSleep\n
  3696. * AHB2LPENR CRYPLPEN LL_C1_AHB2_GRP1_EnableClockSleep\n (*)
  3697. * AHB2LPENR HASHLPEN LL_C1_AHB2_GRP1_EnableClockSleep\n (*)
  3698. * AHB2LPENR RNGLPEN LL_C1_AHB2_GRP1_EnableClockSleep\n
  3699. * AHB2LPENR SDMMC2LPEN LL_C1_AHB2_GRP1_EnableClockSleep\n
  3700. * AHB2LPENR D2SRAM1LPEN LL_C1_AHB2_GRP1_EnableClockSleep\n
  3701. * AHB2LPENR BDAM1LPEN LL_C1_AHB2_GRP1_EnableClockSleep\n (*)
  3702. * AHB2LPENR D2SRAM2LPEN LL_C1_AHB2_GRP1_EnableClockSleep\n
  3703. * AHB2LPENR D2SRAM3LPEN LL_C1_AHB2_GRP1_EnableClockSleep (*)
  3704. * @param Periphs This parameter can be a combination of the following values:
  3705. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  3706. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  3707. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  3708. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  3709. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  3710. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  3711. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  3712. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  3713. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  3714. *
  3715. * (*) value not defined in all devices.
  3716. * @retval None
  3717. */
  3718. __STATIC_INLINE void LL_C1_AHB2_GRP1_EnableClockSleep(uint32_t Periphs)
  3719. {
  3720. __IO uint32_t tmpreg;
  3721. SET_BIT(RCC_C1->AHB2LPENR, Periphs);
  3722. /* Delay after an RCC peripheral clock enabling */
  3723. tmpreg = READ_BIT(RCC_C1->AHB2LPENR, Periphs);
  3724. (void)tmpreg;
  3725. }
  3726. /**
  3727. * @brief Disable C1 AHB2 peripherals clock during Low Power (Sleep) mode.
  3728. * @rmtoll AHB2LPENR DCMILPEN LL_C1_AHB2_GRP1_DisableClockSleep\n
  3729. * AHB2LPENR CRYPLPEN LL_C1_AHB2_GRP1_DisableClockSleep\n (*)
  3730. * AHB2LPENR HASHLPEN LL_C1_AHB2_GRP1_DisableClockSleep\n (*)
  3731. * AHB2LPENR RNGLPEN LL_C1_AHB2_GRP1_DisableClockSleep\n
  3732. * AHB2LPENR SDMMC2LPEN LL_C1_AHB2_GRP1_DisableClockSleep\n
  3733. * AHB2LPENR BDAM1LPEN LL_C1_AHB2_GRP1_DisableClockSleep\n (*)
  3734. * AHB2LPENR D2SRAM1LPEN LL_C1_AHB2_GRP1_DisableClockSleep\n
  3735. * AHB2LPENR D2SRAM2LPEN LL_C1_AHB2_GRP1_DisableClockSleep\n
  3736. * AHB2LPENR D2SRAM3LPEN LL_C1_AHB2_GRP1_DisableClockSleep
  3737. * @param Periphs This parameter can be a combination of the following values:
  3738. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  3739. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  3740. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  3741. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  3742. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  3743. * @arg @ref LL_AHB2_GRP1_PERIPH_BDMA1 (*)
  3744. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  3745. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  3746. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  3747. *
  3748. * (*) value not defined in all devices.
  3749. * @retval None
  3750. */
  3751. __STATIC_INLINE void LL_C1_AHB2_GRP1_DisableClockSleep(uint32_t Periphs)
  3752. {
  3753. CLEAR_BIT(RCC_C1->AHB2LPENR, Periphs);
  3754. }
  3755. /**
  3756. * @}
  3757. */
  3758. /** @addtogroup BUS_LL_EF_AHB4 AHB4
  3759. * @{
  3760. */
  3761. /**
  3762. * @brief Enable C1 AHB4 peripherals clock.
  3763. * @rmtoll AHB4ENR GPIOAEN LL_C1_AHB4_GRP1_EnableClock\n
  3764. * AHB4ENR GPIOBEN LL_C1_AHB4_GRP1_EnableClock\n
  3765. * AHB4ENR GPIOCEN LL_C1_AHB4_GRP1_EnableClock\n
  3766. * AHB4ENR GPIODEN LL_C1_AHB4_GRP1_EnableClock\n
  3767. * AHB4ENR GPIOEEN LL_C1_AHB4_GRP1_EnableClock\n
  3768. * AHB4ENR GPIOFEN LL_C1_AHB4_GRP1_EnableClock\n
  3769. * AHB4ENR GPIOGEN LL_C1_AHB4_GRP1_EnableClock\n
  3770. * AHB4ENR GPIOHEN LL_C1_AHB4_GRP1_EnableClock\n
  3771. * AHB4ENR GPIOIEN LL_C1_AHB4_GRP1_EnableClock\n
  3772. * AHB4ENR GPIOJEN LL_C1_AHB4_GRP1_EnableClock\n
  3773. * AHB4ENR GPIOKEN LL_C1_AHB4_GRP1_EnableClock\n
  3774. * AHB4ENR CRCEN LL_C1_AHB4_GRP1_EnableClock\n (*)
  3775. * AHB4ENR BDMAEN LL_C1_AHB4_GRP1_EnableClock\n
  3776. * AHB4ENR ADC3EN LL_C1_AHB4_GRP1_EnableClock\n (*)
  3777. * AHB4ENR HSEMEN LL_C1_AHB4_GRP1_EnableClock\n (*)
  3778. * AHB4ENR BKPRAMEN LL_C1_AHB4_GRP1_EnableClock\n
  3779. * AHB4ENR SRAM4EN LL_C1_AHB4_GRP1_EnableClock
  3780. * @param Periphs This parameter can be a combination of the following values:
  3781. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  3782. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  3783. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  3784. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  3785. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  3786. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  3787. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  3788. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  3789. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  3790. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  3791. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  3792. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  3793. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  3794. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  3795. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  3796. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  3797. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  3798. *
  3799. * (*) value not defined in all devices.
  3800. * @retval None
  3801. */
  3802. __STATIC_INLINE void LL_C1_AHB4_GRP1_EnableClock(uint32_t Periphs)
  3803. {
  3804. __IO uint32_t tmpreg;
  3805. SET_BIT(RCC_C1->AHB4ENR, Periphs);
  3806. /* Delay after an RCC peripheral clock enabling */
  3807. tmpreg = READ_BIT(RCC_C1->AHB4ENR, Periphs);
  3808. (void)tmpreg;
  3809. }
  3810. /**
  3811. * @brief Check if C1 AHB4 peripheral clock is enabled or not
  3812. * @rmtoll AHB4ENR GPIOAEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3813. * AHB4ENR GPIOBEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3814. * AHB4ENR GPIOCEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3815. * AHB4ENR GPIODEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3816. * AHB4ENR GPIOEEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3817. * AHB4ENR GPIOFEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3818. * AHB4ENR GPIOGEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3819. * AHB4ENR GPIOHEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3820. * AHB4ENR GPIOIEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3821. * AHB4ENR GPIOJEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3822. * AHB4ENR GPIOKEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3823. * AHB4ENR CRCEN LL_C1_AHB4_GRP1_IsEnabledClock\n (*)
  3824. * AHB4ENR BDMAEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3825. * AHB4ENR ADC3EN LL_C1_AHB4_GRP1_IsEnabledClock\n (*)
  3826. * AHB4ENR HSEMEN LL_C1_AHB4_GRP1_IsEnabledClock\n (*)
  3827. * AHB4ENR BKPRAMEN LL_C1_AHB4_GRP1_IsEnabledClock\n
  3828. * AHB4ENR SRAM4EN LL_C1_AHB4_GRP1_IsEnabledClock
  3829. * @param Periphs This parameter can be a combination of the following values:
  3830. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  3831. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  3832. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  3833. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  3834. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  3835. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  3836. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  3837. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  3838. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  3839. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  3840. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  3841. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  3842. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  3843. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  3844. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  3845. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  3846. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  3847. *
  3848. * (*) value not defined in all devices.
  3849. * @retval uint32_t
  3850. */
  3851. __STATIC_INLINE uint32_t LL_C1_AHB4_GRP1_IsEnabledClock(uint32_t Periphs)
  3852. {
  3853. return ((READ_BIT(RCC_C1->AHB4ENR, Periphs) == Periphs) ? 1U : 0U);
  3854. }
  3855. /**
  3856. * @brief Disable C1 AHB4 peripherals clock.
  3857. * @rmtoll AHB4ENR GPIOAEN LL_C1_AHB4_GRP1_DisableClock\n
  3858. * AHB4ENR GPIOBEN LL_C1_AHB4_GRP1_DisableClock\n
  3859. * AHB4ENR GPIOCEN LL_C1_AHB4_GRP1_DisableClock\n
  3860. * AHB4ENR GPIODEN LL_C1_AHB4_GRP1_DisableClock\n
  3861. * AHB4ENR GPIOEEN LL_C1_AHB4_GRP1_DisableClock\n
  3862. * AHB4ENR GPIOFEN LL_C1_AHB4_GRP1_DisableClock\n
  3863. * AHB4ENR GPIOGEN LL_C1_AHB4_GRP1_DisableClock\n
  3864. * AHB4ENR GPIOHEN LL_C1_AHB4_GRP1_DisableClock\n
  3865. * AHB4ENR GPIOIEN LL_C1_AHB4_GRP1_DisableClock\n
  3866. * AHB4ENR GPIOJEN LL_C1_AHB4_GRP1_DisableClock\n
  3867. * AHB4ENR GPIOKEN LL_C1_AHB4_GRP1_DisableClock\n
  3868. * AHB4ENR CRCEN LL_C1_AHB4_GRP1_DisableClock\n (*)
  3869. * AHB4ENR BDMAEN LL_C1_AHB4_GRP1_DisableClock\n
  3870. * AHB4ENR ADC3EN LL_C1_AHB4_GRP1_DisableClock\n (*)
  3871. * AHB4ENR HSEMEN LL_C1_AHB4_GRP1_DisableClock\n (*)
  3872. * AHB4ENR BKPRAMEN LL_C1_AHB4_GRP1_DisableClock\n
  3873. * AHB4ENR SRAM4EN LL_C1_AHB4_GRP1_DisableClock
  3874. * @param Periphs This parameter can be a combination of the following values:
  3875. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  3876. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  3877. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  3878. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  3879. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  3880. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  3881. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  3882. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  3883. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  3884. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  3885. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  3886. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  3887. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  3888. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  3889. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  3890. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  3891. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  3892. *
  3893. * (*) value not defined in all devices.
  3894. * @retval None
  3895. */
  3896. __STATIC_INLINE void LL_C1_AHB4_GRP1_DisableClock(uint32_t Periphs)
  3897. {
  3898. CLEAR_BIT(RCC_C1->AHB4ENR, Periphs);
  3899. }
  3900. /**
  3901. * @brief Enable C1 AHB4 peripherals clock during Low Power (Sleep) mode.
  3902. * @rmtoll AHB4LPENR GPIOALPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3903. * AHB4LPENR GPIOBLPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3904. * AHB4LPENR GPIOCLPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3905. * AHB4LPENR GPIODLPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3906. * AHB4LPENR GPIOELPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3907. * AHB4LPENR GPIOFLPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3908. * AHB4LPENR GPIOGLPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3909. * AHB4LPENR GPIOHLPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3910. * AHB4LPENR GPIOILPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3911. * AHB4LPENR GPIOJLPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3912. * AHB4LPENR GPIOKLPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3913. * AHB4LPENR CRCLPEN LL_C1_AHB4_GRP1_EnableClockSleep\n (*)
  3914. * AHB4LPENR BDMALPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3915. * AHB4LPENR ADC3LPEN LL_C1_AHB4_GRP1_EnableClockSleep\n (*)
  3916. * AHB4LPENR BKPRAMLPEN LL_C1_AHB4_GRP1_EnableClockSleep\n
  3917. * AHB4LPENR SRAM4LPEN LL_C1_AHB4_GRP1_EnableClockSleep
  3918. * @param Periphs This parameter can be a combination of the following values:
  3919. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  3920. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  3921. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  3922. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  3923. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  3924. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  3925. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  3926. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  3927. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  3928. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  3929. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  3930. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  3931. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  3932. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  3933. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  3934. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  3935. * @retval None
  3936. */
  3937. __STATIC_INLINE void LL_C1_AHB4_GRP1_EnableClockSleep(uint32_t Periphs)
  3938. {
  3939. __IO uint32_t tmpreg;
  3940. SET_BIT(RCC_C1->AHB4LPENR, Periphs);
  3941. /* Delay after an RCC peripheral clock enabling */
  3942. tmpreg = READ_BIT(RCC_C1->AHB4LPENR, Periphs);
  3943. (void)tmpreg;
  3944. }
  3945. /**
  3946. * @brief Disable C1 AHB4 peripherals clock during Low Power (Sleep) mode.
  3947. * @rmtoll AHB4LPENR GPIOALPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3948. * AHB4LPENR GPIOBLPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3949. * AHB4LPENR GPIOCLPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3950. * AHB4LPENR GPIODLPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3951. * AHB4LPENR GPIOELPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3952. * AHB4LPENR GPIOFLPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3953. * AHB4LPENR GPIOGLPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3954. * AHB4LPENR GPIOHLPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3955. * AHB4LPENR GPIOILPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3956. * AHB4LPENR GPIOJLPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3957. * AHB4LPENR GPIOKLPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3958. * AHB4LPENR CRCLPEN LL_C1_AHB4_GRP1_DisableClockSleep\n (*)
  3959. * AHB4LPENR BDMALPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3960. * AHB4LPENR ADC3LPEN LL_C1_AHB4_GRP1_DisableClockSleep\n (*)
  3961. * AHB4LPENR BKPRAMLPEN LL_C1_AHB4_GRP1_DisableClockSleep\n
  3962. * AHB4LPENR SRAM4LPEN LL_C1_AHB4_GRP1_DisableClockSleep
  3963. * @param Periphs This parameter can be a combination of the following values:
  3964. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  3965. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  3966. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  3967. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  3968. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  3969. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  3970. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  3971. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  3972. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  3973. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  3974. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  3975. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  3976. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  3977. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  3978. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  3979. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  3980. * @retval None
  3981. */
  3982. __STATIC_INLINE void LL_C1_AHB4_GRP1_DisableClockSleep(uint32_t Periphs)
  3983. {
  3984. CLEAR_BIT(RCC_C1->AHB4LPENR, Periphs);
  3985. }
  3986. /**
  3987. * @}
  3988. */
  3989. /** @addtogroup BUS_LL_EF_APB3 APB3
  3990. * @{
  3991. */
  3992. /**
  3993. * @brief Enable C1 APB3 peripherals clock.
  3994. * @rmtoll APB3ENR LTDCEN LL_C1_APB3_GRP1_EnableClock\n (*)
  3995. * APB3ENR DSIEN LL_C1_APB3_GRP1_EnableClock\n (*)
  3996. * APB3ENR WWDG1EN LL_C1_APB3_GRP1_EnableClock
  3997. * @param Periphs This parameter can be a combination of the following values:
  3998. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  3999. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  4000. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  4001. *
  4002. * (*) value not defined in all devices.
  4003. * @retval None
  4004. */
  4005. __STATIC_INLINE void LL_C1_APB3_GRP1_EnableClock(uint32_t Periphs)
  4006. {
  4007. __IO uint32_t tmpreg;
  4008. SET_BIT(RCC_C1->APB3ENR, Periphs);
  4009. /* Delay after an RCC peripheral clock enabling */
  4010. tmpreg = READ_BIT(RCC_C1->APB3ENR, Periphs);
  4011. (void)tmpreg;
  4012. }
  4013. /**
  4014. * @brief Check if C1 APB3 peripheral clock is enabled or not
  4015. * @rmtoll APB3ENR LTDCEN LL_C1_APB3_GRP1_IsEnabledClock\n (*)
  4016. * APB3ENR DSIEN LL_C1_APB3_GRP1_IsEnabledClock\n (*)
  4017. * APB3ENR WWDG1EN LL_C1_APB3_GRP1_IsEnabledClock
  4018. * @param Periphs This parameter can be a combination of the following values:
  4019. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  4020. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  4021. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  4022. *
  4023. * (*) value not defined in all devices.
  4024. * @retval uint32_t
  4025. */
  4026. __STATIC_INLINE uint32_t LL_C1_APB3_GRP1_IsEnabledClock(uint32_t Periphs)
  4027. {
  4028. return ((READ_BIT(RCC_C1->APB3ENR, Periphs) == Periphs) ? 1U : 0U);
  4029. }
  4030. /**
  4031. * @brief Disable C1 APB3 peripherals clock.
  4032. * @rmtoll APB3ENR LTDCEN LL_C1_APB3_GRP1_DisableClock\n (*)
  4033. * APB3ENR DSIEN LL_C1_APB3_GRP1_DisableClock\n (*)
  4034. * APB3ENR WWDG1EN LL_C1_APB3_GRP1_DisableClock
  4035. * @param Periphs This parameter can be a combination of the following values:
  4036. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  4037. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  4038. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  4039. *
  4040. * (*) value not defined in all devices.
  4041. * @retval None
  4042. */
  4043. __STATIC_INLINE void LL_C1_APB3_GRP1_DisableClock(uint32_t Periphs)
  4044. {
  4045. CLEAR_BIT(RCC_C1->APB3ENR, Periphs);
  4046. }
  4047. /**
  4048. * @brief Enable C1 APB3 peripherals clock during Low Power (Sleep) mode.
  4049. * @rmtoll APB3LPENR LTDCLPEN LL_C1_APB3_GRP1_EnableClockSleep\n (*)
  4050. * APB3LPENR DSILPEN LL_C1_APB3_GRP1_EnableClockSleep\n (*)
  4051. * APB3LPENR WWDG1LPEN LL_C1_APB3_GRP1_EnableClockSleep
  4052. * @param Periphs This parameter can be a combination of the following values:
  4053. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  4054. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  4055. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  4056. *
  4057. * (*) value not defined in all devices.
  4058. * @retval None
  4059. */
  4060. __STATIC_INLINE void LL_C1_APB3_GRP1_EnableClockSleep(uint32_t Periphs)
  4061. {
  4062. __IO uint32_t tmpreg;
  4063. SET_BIT(RCC_C1->APB3LPENR, Periphs);
  4064. /* Delay after an RCC peripheral clock enabling */
  4065. tmpreg = READ_BIT(RCC_C1->APB3LPENR, Periphs);
  4066. (void)tmpreg;
  4067. }
  4068. /**
  4069. * @brief Disable C1 APB3 peripherals clock during Low Power (Sleep) mode.
  4070. * @rmtoll APB3LPENR LTDCLPEN LL_C1_APB3_GRP1_DisableClockSleep\n (*)
  4071. * APB3LPENR DSILPEN LL_C1_APB3_GRP1_DisableClockSleep\n (*)
  4072. * APB3LPENR WWDG1LPEN LL_C1_APB3_GRP1_DisableClockSleep
  4073. * @param Periphs This parameter can be a combination of the following values:
  4074. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  4075. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  4076. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  4077. *
  4078. * (*) value not defined in all devices.
  4079. * @retval None
  4080. */
  4081. __STATIC_INLINE void LL_C1_APB3_GRP1_DisableClockSleep(uint32_t Periphs)
  4082. {
  4083. CLEAR_BIT(RCC_C1->APB3LPENR, Periphs);
  4084. }
  4085. /**
  4086. * @}
  4087. */
  4088. /** @addtogroup BUS_LL_EF_APB1 APB1
  4089. * @{
  4090. */
  4091. /**
  4092. * @brief Enable C1 APB1 peripherals clock.
  4093. * @rmtoll APB1LENR TIM2EN LL_C1_APB1_GRP1_EnableClock\n
  4094. * APB1LENR TIM3EN LL_C1_APB1_GRP1_EnableClock\n
  4095. * APB1LENR TIM4EN LL_C1_APB1_GRP1_EnableClock\n
  4096. * APB1LENR TIM5EN LL_C1_APB1_GRP1_EnableClock\n
  4097. * APB1LENR TIM6EN LL_C1_APB1_GRP1_EnableClock\n
  4098. * APB1LENR TIM7EN LL_C1_APB1_GRP1_EnableClock\n
  4099. * APB1LENR TIM12EN LL_C1_APB1_GRP1_EnableClock\n
  4100. * APB1LENR TIM13EN LL_C1_APB1_GRP1_EnableClock\n
  4101. * APB1LENR TIM14EN LL_C1_APB1_GRP1_EnableClock\n
  4102. * APB1LENR LPTIM1EN LL_C1_APB1_GRP1_EnableClock\n
  4103. * APB1LENR WWDG2EN LL_C1_APB1_GRP1_EnableClock\n (*)
  4104. * APB1LENR SPI2EN LL_C1_APB1_GRP1_EnableClock\n
  4105. * APB1LENR SPI3EN LL_C1_APB1_GRP1_EnableClock\n
  4106. * APB1LENR SPDIFRXEN LL_C1_APB1_GRP1_EnableClock\n
  4107. * APB1LENR USART2EN LL_C1_APB1_GRP1_EnableClock\n
  4108. * APB1LENR USART3EN LL_C1_APB1_GRP1_EnableClock\n
  4109. * APB1LENR UART4EN LL_C1_APB1_GRP1_EnableClock\n
  4110. * APB1LENR UART5EN LL_C1_APB1_GRP1_EnableClock\n
  4111. * APB1LENR I2C1EN LL_C1_APB1_GRP1_EnableClock\n
  4112. * APB1LENR I2C2EN LL_C1_APB1_GRP1_EnableClock\n
  4113. * APB1LENR I2C3EN LL_C1_APB1_GRP1_EnableClock\n
  4114. * APB1LENR CECEN LL_C1_APB1_GRP1_EnableClock\n
  4115. * APB1LENR DAC12EN LL_C1_APB1_GRP1_EnableClock\n
  4116. * APB1LENR UART7EN LL_C1_APB1_GRP1_EnableClock\n
  4117. * APB1LENR UART8EN LL_C1_APB1_GRP1_EnableClock
  4118. * @param Periphs This parameter can be a combination of the following values:
  4119. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  4120. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  4121. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  4122. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  4123. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  4124. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  4125. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  4126. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  4127. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  4128. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  4129. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  4130. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  4131. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  4132. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  4133. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  4134. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  4135. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  4136. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  4137. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  4138. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  4139. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  4140. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  4141. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  4142. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  4143. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  4144. *
  4145. * (*) value not defined in all devices.
  4146. * @retval None
  4147. */
  4148. __STATIC_INLINE void LL_C1_APB1_GRP1_EnableClock(uint32_t Periphs)
  4149. {
  4150. __IO uint32_t tmpreg;
  4151. SET_BIT(RCC_C1->APB1LENR, Periphs);
  4152. /* Delay after an RCC peripheral clock enabling */
  4153. tmpreg = READ_BIT(RCC_C1->APB1LENR, Periphs);
  4154. (void)tmpreg;
  4155. }
  4156. /**
  4157. * @brief Check if C1 APB1 peripheral clock is enabled or not
  4158. * @rmtoll APB1LENR TIM2EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4159. * APB1LENR TIM3EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4160. * APB1LENR TIM4EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4161. * APB1LENR TIM5EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4162. * APB1LENR TIM6EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4163. * APB1LENR TIM7EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4164. * APB1LENR TIM12EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4165. * APB1LENR TIM13EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4166. * APB1LENR TIM14EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4167. * APB1LENR LPTIM1EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4168. * APB1LENR WWDG2EN LL_C1_APB1_GRP1_IsEnabledClock\n (*)
  4169. * APB1LENR SPI2EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4170. * APB1LENR SPI3EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4171. * APB1LENR SPDIFRXEN LL_C1_APB1_GRP1_IsEnabledClock\n
  4172. * APB1LENR USART2EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4173. * APB1LENR USART3EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4174. * APB1LENR UART4EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4175. * APB1LENR UART5EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4176. * APB1LENR I2C1EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4177. * APB1LENR I2C2EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4178. * APB1LENR I2C3EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4179. * APB1LENR CECEN LL_C1_APB1_GRP1_IsEnabledClock\n
  4180. * APB1LENR DAC12EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4181. * APB1LENR UART7EN LL_C1_APB1_GRP1_IsEnabledClock\n
  4182. * APB1LENR UART8EN LL_C1_APB1_GRP1_IsEnabledClock
  4183. * @param Periphs This parameter can be a combination of the following values:
  4184. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  4185. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  4186. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  4187. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  4188. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  4189. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  4190. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  4191. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  4192. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  4193. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  4194. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  4195. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  4196. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  4197. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  4198. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  4199. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  4200. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  4201. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  4202. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  4203. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  4204. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  4205. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  4206. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  4207. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  4208. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  4209. *
  4210. * (*) value not defined in all devices.
  4211. * @retval uint32_t
  4212. */
  4213. __STATIC_INLINE uint32_t LL_C1_APB1_GRP1_IsEnabledClock(uint32_t Periphs)
  4214. {
  4215. return ((READ_BIT(RCC_C1->APB1LENR, Periphs) == Periphs) ? 1U : 0U);
  4216. }
  4217. /**
  4218. * @brief Disable C1 APB1 peripherals clock.
  4219. * @rmtoll APB1LENR TIM2EN LL_C1_APB1_GRP1_DisableClock\n
  4220. * APB1LENR TIM3EN LL_C1_APB1_GRP1_DisableClock\n
  4221. * APB1LENR TIM4EN LL_C1_APB1_GRP1_DisableClock\n
  4222. * APB1LENR TIM5EN LL_C1_APB1_GRP1_DisableClock\n
  4223. * APB1LENR TIM6EN LL_C1_APB1_GRP1_DisableClock\n
  4224. * APB1LENR TIM7EN LL_C1_APB1_GRP1_DisableClock\n
  4225. * APB1LENR TIM12EN LL_C1_APB1_GRP1_DisableClock\n
  4226. * APB1LENR TIM13EN LL_C1_APB1_GRP1_DisableClock\n
  4227. * APB1LENR TIM14EN LL_C1_APB1_GRP1_DisableClock\n
  4228. * APB1LENR LPTIM1EN LL_C1_APB1_GRP1_DisableClock\n
  4229. * APB1LENR WWDG2EN LL_C1_APB1_GRP1_DisableClock\n (*)
  4230. * APB1LENR SPI2EN LL_C1_APB1_GRP1_DisableClock\n
  4231. * APB1LENR SPI3EN LL_C1_APB1_GRP1_DisableClock\n
  4232. * APB1LENR SPDIFRXEN LL_C1_APB1_GRP1_DisableClock\n
  4233. * APB1LENR USART2EN LL_C1_APB1_GRP1_DisableClock\n
  4234. * APB1LENR USART3EN LL_C1_APB1_GRP1_DisableClock\n
  4235. * APB1LENR UART4EN LL_C1_APB1_GRP1_DisableClock\n
  4236. * APB1LENR UART5EN LL_C1_APB1_GRP1_DisableClock\n
  4237. * APB1LENR I2C1EN LL_C1_APB1_GRP1_DisableClock\n
  4238. * APB1LENR I2C2EN LL_C1_APB1_GRP1_DisableClock\n
  4239. * APB1LENR I2C3EN LL_C1_APB1_GRP1_DisableClock\n
  4240. * APB1LENR CECEN LL_C1_APB1_GRP1_DisableClock\n
  4241. * APB1LENR DAC12EN LL_C1_APB1_GRP1_DisableClock\n
  4242. * APB1LENR UART7EN LL_C1_APB1_GRP1_DisableClock\n
  4243. * APB1LENR UART8EN LL_C1_APB1_GRP1_DisableClock
  4244. * @param Periphs This parameter can be a combination of the following values:
  4245. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  4246. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  4247. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  4248. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  4249. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  4250. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  4251. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  4252. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  4253. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  4254. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  4255. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  4256. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  4257. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  4258. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  4259. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  4260. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  4261. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  4262. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  4263. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  4264. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  4265. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  4266. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  4267. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  4268. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  4269. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  4270. *
  4271. * (*) value not defined in all devices.
  4272. * @retval uint32_t
  4273. */
  4274. __STATIC_INLINE void LL_C1_APB1_GRP1_DisableClock(uint32_t Periphs)
  4275. {
  4276. CLEAR_BIT(RCC_C1->APB1LENR, Periphs);
  4277. }
  4278. /**
  4279. * @brief Enable C1 APB1 peripherals clock during Low Power (Sleep) mode.
  4280. * @rmtoll APB1LLPENR TIM2LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4281. * APB1LLPENR TIM3LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4282. * APB1LLPENR TIM4LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4283. * APB1LLPENR TIM5LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4284. * APB1LLPENR TIM6LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4285. * APB1LLPENR TIM7LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4286. * APB1LLPENR TIM12LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4287. * APB1LLPENR TIM13LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4288. * APB1LLPENR TIM14LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4289. * APB1LLPENR LPTIM1LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4290. * APB1LLPENR WWDG2LPEN LL_C1_APB1_GRP1_EnableClockSleep\n (*)
  4291. * APB1LLPENR SPI2LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4292. * APB1LLPENR SPI3LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4293. * APB1LLPENR SPDIFRXLPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4294. * APB1LLPENR USART2LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4295. * APB1LLPENR USART3LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4296. * APB1LLPENR UART4LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4297. * APB1LLPENR UART5LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4298. * APB1LLPENR I2C1LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4299. * APB1LLPENR I2C2LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4300. * APB1LLPENR I2C3LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4301. * APB1LLPENR CECLPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4302. * APB1LLPENR DAC12LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4303. * APB1LLPENR UART7LPEN LL_C1_APB1_GRP1_EnableClockSleep\n
  4304. * APB1LLPENR UART8LPEN LL_C1_APB1_GRP1_EnableClockSleep
  4305. * @param Periphs This parameter can be a combination of the following values:
  4306. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  4307. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  4308. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  4309. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  4310. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  4311. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  4312. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  4313. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  4314. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  4315. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  4316. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  4317. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  4318. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  4319. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  4320. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  4321. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  4322. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  4323. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  4324. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  4325. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  4326. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  4327. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  4328. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  4329. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  4330. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  4331. *
  4332. * (*) value not defined in all devices.
  4333. * @retval None
  4334. */
  4335. __STATIC_INLINE void LL_C1_APB1_GRP1_EnableClockSleep(uint32_t Periphs)
  4336. {
  4337. __IO uint32_t tmpreg;
  4338. SET_BIT(RCC_C1->APB1LLPENR, Periphs);
  4339. /* Delay after an RCC peripheral clock enabling */
  4340. tmpreg = READ_BIT(RCC_C1->APB1LLPENR, Periphs);
  4341. (void)tmpreg;
  4342. }
  4343. /**
  4344. * @brief Disable C1 APB1 peripherals clock during Low Power (Sleep) mode.
  4345. * @rmtoll APB1LLPENR TIM2LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4346. * APB1LLPENR TIM3LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4347. * APB1LLPENR TIM4LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4348. * APB1LLPENR TIM5LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4349. * APB1LLPENR TIM6LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4350. * APB1LLPENR TIM7LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4351. * APB1LLPENR TIM12LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4352. * APB1LLPENR TIM13LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4353. * APB1LLPENR TIM14LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4354. * APB1LLPENR LPTIM1LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4355. * APB1LLPENR WWDG2LPEN LL_C1_APB1_GRP1_DisableClockSleep\n (*)
  4356. * APB1LLPENR SPI2LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4357. * APB1LLPENR SPI3LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4358. * APB1LLPENR SPDIFRXLPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4359. * APB1LLPENR USART2LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4360. * APB1LLPENR USART3LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4361. * APB1LLPENR UART4LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4362. * APB1LLPENR UART5LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4363. * APB1LLPENR I2C1LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4364. * APB1LLPENR I2C2LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4365. * APB1LLPENR I2C3LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4366. * APB1LLPENR CECLPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4367. * APB1LLPENR DAC12LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4368. * APB1LLPENR UART7LPEN LL_C1_APB1_GRP1_DisableClockSleep\n
  4369. * APB1LLPENR UART8LPEN LL_C1_APB1_GRP1_DisableClockSleep
  4370. * @param Periphs This parameter can be a combination of the following values:
  4371. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  4372. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  4373. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  4374. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  4375. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  4376. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  4377. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  4378. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  4379. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  4380. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  4381. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  4382. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  4383. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  4384. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  4385. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  4386. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  4387. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  4388. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  4389. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  4390. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  4391. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  4392. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  4393. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  4394. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  4395. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  4396. *
  4397. * (*) value not defined in all devices.
  4398. * @retval None
  4399. */
  4400. __STATIC_INLINE void LL_C1_APB1_GRP1_DisableClockSleep(uint32_t Periphs)
  4401. {
  4402. CLEAR_BIT(RCC_C1->APB1LLPENR, Periphs);
  4403. }
  4404. /**
  4405. * @brief Enable C1 APB1 peripherals clock.
  4406. * @rmtoll APB1HENR CRSEN LL_C1_APB1_GRP2_EnableClock\n
  4407. * APB1HENR SWPMIEN LL_C1_APB1_GRP2_EnableClock\n
  4408. * APB1HENR OPAMPEN LL_C1_APB1_GRP2_EnableClock\n
  4409. * APB1HENR MDIOSEN LL_C1_APB1_GRP2_EnableClock\n
  4410. * APB1HENR FDCANEN LL_C1_APB1_GRP2_EnableClock
  4411. * @param Periphs This parameter can be a combination of the following values:
  4412. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  4413. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  4414. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  4415. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  4416. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  4417. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  4418. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  4419. *
  4420. * (*) value not defined in all devices.
  4421. * @retval None
  4422. */
  4423. __STATIC_INLINE void LL_C1_APB1_GRP2_EnableClock(uint32_t Periphs)
  4424. {
  4425. __IO uint32_t tmpreg;
  4426. SET_BIT(RCC_C1->APB1HENR, Periphs);
  4427. /* Delay after an RCC peripheral clock enabling */
  4428. tmpreg = READ_BIT(RCC_C1->APB1HENR, Periphs);
  4429. (void)tmpreg;
  4430. }
  4431. /**
  4432. * @brief Check if C1 APB1 peripheral clock is enabled or not
  4433. * @rmtoll APB1HENR CRSEN LL_C1_APB1_GRP2_IsEnabledClock\n
  4434. * APB1HENR SWPMIEN LL_C1_APB1_GRP2_IsEnabledClock\n
  4435. * APB1HENR OPAMPEN LL_C1_APB1_GRP2_IsEnabledClock\n
  4436. * APB1HENR MDIOSEN LL_C1_APB1_GRP2_IsEnabledClock\n
  4437. * APB1HENR FDCANEN LL_C1_APB1_GRP2_IsEnabledClock
  4438. * @param Periphs This parameter can be a combination of the following values:
  4439. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  4440. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  4441. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  4442. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  4443. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  4444. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  4445. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  4446. *
  4447. * (*) value not defined in all devices.
  4448. * @retval uint32_t
  4449. */
  4450. __STATIC_INLINE uint32_t LL_C1_APB1_GRP2_IsEnabledClock(uint32_t Periphs)
  4451. {
  4452. return ((READ_BIT(RCC_C1->APB1HENR, Periphs) == Periphs) ? 1U : 0U);
  4453. }
  4454. /**
  4455. * @brief Disable C1 APB1 peripherals clock.
  4456. * @rmtoll APB1HENR CRSEN LL_C1_APB1_GRP2_DisableClock\n
  4457. * APB1HENR SWPMIEN LL_C1_APB1_GRP2_DisableClock\n
  4458. * APB1HENR OPAMPEN LL_C1_APB1_GRP2_DisableClock\n
  4459. * APB1HENR MDIOSEN LL_C1_APB1_GRP2_DisableClock\n
  4460. * APB1HENR FDCANEN LL_C1_APB1_GRP2_DisableClock
  4461. * @param Periphs This parameter can be a combination of the following values:
  4462. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  4463. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  4464. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  4465. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  4466. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  4467. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  4468. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  4469. *
  4470. * (*) value not defined in all devices.
  4471. * @retval None
  4472. */
  4473. __STATIC_INLINE void LL_C1_APB1_GRP2_DisableClock(uint32_t Periphs)
  4474. {
  4475. CLEAR_BIT(RCC_C1->APB1HENR, Periphs);
  4476. }
  4477. /**
  4478. * @brief Enable C1 APB1 peripherals clock during Low Power (Sleep) mode.
  4479. * @rmtoll APB1HLPENR CRSLPEN LL_C1_APB1_GRP2_EnableClockSleep\n
  4480. * APB1HLPENR SWPMILPEN LL_C1_APB1_GRP2_EnableClockSleep\n
  4481. * APB1HLPENR OPAMPLPEN LL_C1_APB1_GRP2_EnableClockSleep\n
  4482. * APB1HLPENR MDIOSLPEN LL_C1_APB1_GRP2_EnableClockSleep\n
  4483. * APB1HLPENR FDCANLPEN LL_C1_APB1_GRP2_EnableClockSleep
  4484. * @param Periphs This parameter can be a combination of the following values:
  4485. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  4486. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  4487. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  4488. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  4489. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  4490. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  4491. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  4492. *
  4493. * (*) value not defined in all devices.
  4494. * @retval None
  4495. */
  4496. __STATIC_INLINE void LL_C1_APB1_GRP2_EnableClockSleep(uint32_t Periphs)
  4497. {
  4498. __IO uint32_t tmpreg;
  4499. SET_BIT(RCC_C1->APB1HLPENR, Periphs);
  4500. /* Delay after an RCC peripheral clock enabling */
  4501. tmpreg = READ_BIT(RCC_C1->APB1HLPENR, Periphs);
  4502. (void)tmpreg;
  4503. }
  4504. /**
  4505. * @brief Disable C1 APB1 peripherals clock during Low Power (Sleep) mode.
  4506. * @rmtoll APB1HLPENR CRSLPEN LL_C1_APB1_GRP2_DisableClockSleep\n
  4507. * APB1HLPENR SWPMILPEN LL_C1_APB1_GRP2_DisableClockSleep\n
  4508. * APB1HLPENR OPAMPLPEN LL_C1_APB1_GRP2_DisableClockSleep\n
  4509. * APB1HLPENR MDIOSLPEN LL_C1_APB1_GRP2_DisableClockSleep\n
  4510. * APB1HLPENR FDCANLPEN LL_C1_APB1_GRP2_DisableClockSleep
  4511. * @param Periphs This parameter can be a combination of the following values:
  4512. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  4513. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  4514. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  4515. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  4516. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  4517. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  4518. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  4519. *
  4520. * (*) value not defined in all devices.
  4521. * @retval None
  4522. */
  4523. __STATIC_INLINE void LL_C1_APB1_GRP2_DisableClockSleep(uint32_t Periphs)
  4524. {
  4525. CLEAR_BIT(RCC_C1->APB1HLPENR, Periphs);
  4526. }
  4527. /**
  4528. * @}
  4529. */
  4530. /** @addtogroup BUS_LL_EF_APB2 APB2
  4531. * @{
  4532. */
  4533. /**
  4534. * @brief Enable C1 APB2 peripherals clock.
  4535. * @rmtoll APB2ENR TIM1EN LL_C1_APB2_GRP1_EnableClock\n
  4536. * APB2ENR TIM8EN LL_C1_APB2_GRP1_EnableClock\n
  4537. * APB2ENR USART1EN LL_C1_APB2_GRP1_EnableClock\n
  4538. * APB2ENR USART6EN LL_C1_APB2_GRP1_EnableClock\n
  4539. * APB2ENR UART9EN LL_C1_APB2_GRP1_EnableClock\n (*)
  4540. * APB2ENR USART10EN LL_C1_APB2_GRP1_EnableClock\n (*)
  4541. * APB2ENR SPI1EN LL_C1_APB2_GRP1_EnableClock\n
  4542. * APB2ENR SPI4EN LL_C1_APB2_GRP1_EnableClock\n
  4543. * APB2ENR TIM15EN LL_C1_APB2_GRP1_EnableClock\n
  4544. * APB2ENR TIM16EN LL_C1_APB2_GRP1_EnableClock\n
  4545. * APB2ENR TIM17EN LL_C1_APB2_GRP1_EnableClock\n
  4546. * APB2ENR SPI5EN LL_C1_APB2_GRP1_EnableClock\n
  4547. * APB2ENR SAI1EN LL_C1_APB2_GRP1_EnableClock\n
  4548. * APB2ENR SAI2EN LL_C1_APB2_GRP1_EnableClock\n
  4549. * APB2ENR SAI3EN LL_C1_APB2_GRP1_EnableClock\n (*)
  4550. * APB2ENR DFSDM1EN LL_C1_APB2_GRP1_EnableClock\n
  4551. * APB2ENR HRTIMEN LL_C1_APB2_GRP1_EnableClock (*)
  4552. * @param Periphs This parameter can be a combination of the following values:
  4553. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  4554. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  4555. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  4556. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  4557. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  4558. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  4559. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  4560. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  4561. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  4562. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  4563. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  4564. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  4565. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  4566. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  4567. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  4568. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  4569. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  4570. *
  4571. * (*) value not defined in all devices.
  4572. * @retval None
  4573. */
  4574. __STATIC_INLINE void LL_C1_APB2_GRP1_EnableClock(uint32_t Periphs)
  4575. {
  4576. __IO uint32_t tmpreg;
  4577. SET_BIT(RCC_C1->APB2ENR, Periphs);
  4578. /* Delay after an RCC peripheral clock enabling */
  4579. tmpreg = READ_BIT(RCC_C1->APB2ENR, Periphs);
  4580. (void)tmpreg;
  4581. }
  4582. /**
  4583. * @brief Check if C1 APB2 peripheral clock is enabled or not
  4584. * @rmtoll APB2ENR TIM1EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4585. * APB2ENR TIM8EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4586. * APB2ENR USART1EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4587. * APB2ENR USART6EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4588. * APB2ENR UART9EN LL_C1_APB2_GRP1_IsEnabledClock\n (*)
  4589. * APB2ENR USART10EN LL_C1_APB2_GRP1_IsEnabledClock\n (*)
  4590. * APB2ENR SPI1EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4591. * APB2ENR SPI4EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4592. * APB2ENR TIM15EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4593. * APB2ENR TIM16EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4594. * APB2ENR TIM17EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4595. * APB2ENR SPI5EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4596. * APB2ENR SAI1EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4597. * APB2ENR SAI2EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4598. * APB2ENR SAI3EN LL_C1_APB2_GRP1_IsEnabledClock\n (*)
  4599. * APB2ENR DFSDM1EN LL_C1_APB2_GRP1_IsEnabledClock\n
  4600. * APB2ENR HRTIMEN LL_C1_APB2_GRP1_IsEnabledClock (*)
  4601. * @param Periphs This parameter can be a combination of the following values:
  4602. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  4603. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  4604. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  4605. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  4606. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  4607. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  4608. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  4609. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  4610. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  4611. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  4612. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  4613. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  4614. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  4615. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  4616. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  4617. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  4618. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  4619. *
  4620. * (*) value not defined in all devices.
  4621. * @retval None
  4622. */
  4623. __STATIC_INLINE uint32_t LL_C1_APB2_GRP1_IsEnabledClock(uint32_t Periphs)
  4624. {
  4625. return ((READ_BIT(RCC_C1->APB2ENR, Periphs) == Periphs) ? 1U : 0U);
  4626. }
  4627. /**
  4628. * @brief Disable C1 APB2 peripherals clock.
  4629. * @rmtoll APB2ENR TIM1EN LL_C1_APB2_GRP1_DisableClock\n
  4630. * APB2ENR TIM8EN LL_C1_APB2_GRP1_DisableClock\n
  4631. * APB2ENR USART1EN LL_C1_APB2_GRP1_DisableClock\n
  4632. * APB2ENR USART6EN LL_C1_APB2_GRP1_DisableClock\n
  4633. * APB2ENR UART9EN LL_C1_APB2_GRP1_DisableClock\n (*)
  4634. * APB2ENR USART10EN LL_C1_APB2_GRP1_DisableClock\n (*)
  4635. * APB2ENR SPI1EN LL_C1_APB2_GRP1_DisableClock\n
  4636. * APB2ENR SPI4EN LL_C1_APB2_GRP1_DisableClock\n
  4637. * APB2ENR TIM15EN LL_C1_APB2_GRP1_DisableClock\n
  4638. * APB2ENR TIM16EN LL_C1_APB2_GRP1_DisableClock\n
  4639. * APB2ENR TIM17EN LL_C1_APB2_GRP1_DisableClock\n
  4640. * APB2ENR SPI5EN LL_C1_APB2_GRP1_DisableClock\n
  4641. * APB2ENR SAI1EN LL_C1_APB2_GRP1_DisableClock\n
  4642. * APB2ENR SAI2EN LL_C1_APB2_GRP1_DisableClock\n
  4643. * APB2ENR SAI3EN LL_C1_APB2_GRP1_DisableClock\n (*)
  4644. * APB2ENR DFSDM1EN LL_C1_APB2_GRP1_DisableClock\n
  4645. * APB2ENR HRTIMEN LL_C1_APB2_GRP1_DisableClock (*)
  4646. * @param Periphs This parameter can be a combination of the following values:
  4647. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  4648. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  4649. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  4650. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  4651. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  4652. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  4653. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  4654. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  4655. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  4656. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  4657. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  4658. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  4659. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  4660. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  4661. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  4662. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  4663. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  4664. *
  4665. * (*) value not defined in all devices.
  4666. * @retval None
  4667. */
  4668. __STATIC_INLINE void LL_C1_APB2_GRP1_DisableClock(uint32_t Periphs)
  4669. {
  4670. CLEAR_BIT(RCC_C1->APB2ENR, Periphs);
  4671. }
  4672. /**
  4673. * @brief Enable C1 APB2 peripherals clock during Low Power (Sleep) mode.
  4674. * @rmtoll APB2LPENR TIM1LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4675. * APB2LPENR TIM8LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4676. * APB2LPENR USART1LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4677. * APB2LPENR USART6LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4678. * APB2ENR UART9EN LL_C1_APB2_GRP1_EnableClockSleep\n (*)
  4679. * APB2ENR USART10EN LL_C1_APB2_GRP1_EnableClockSleep\n (*)
  4680. * APB2LPENR SPI1LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4681. * APB2LPENR SPI4LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4682. * APB2LPENR TIM15LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4683. * APB2LPENR TIM16LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4684. * APB2LPENR TIM17LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4685. * APB2LPENR SPI5LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4686. * APB2LPENR SAI1LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4687. * APB2LPENR SAI2LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4688. * APB2LPENR SAI3LPEN LL_C1_APB2_GRP1_EnableClockSleep\n (*)
  4689. * APB2LPENR DFSDM1LPEN LL_C1_APB2_GRP1_EnableClockSleep\n
  4690. * APB2LPENR HRTIMLPEN LL_C1_APB2_GRP1_EnableClockSleep (*)
  4691. * @param Periphs This parameter can be a combination of the following values:
  4692. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  4693. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  4694. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  4695. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  4696. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  4697. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  4698. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  4699. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  4700. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  4701. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  4702. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  4703. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  4704. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  4705. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  4706. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  4707. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  4708. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  4709. *
  4710. * (*) value not defined in all devices.
  4711. * @retval None
  4712. */
  4713. __STATIC_INLINE void LL_C1_APB2_GRP1_EnableClockSleep(uint32_t Periphs)
  4714. {
  4715. __IO uint32_t tmpreg;
  4716. SET_BIT(RCC_C1->APB2LPENR, Periphs);
  4717. /* Delay after an RCC peripheral clock enabling */
  4718. tmpreg = READ_BIT(RCC_C1->APB2LPENR, Periphs);
  4719. (void)tmpreg;
  4720. }
  4721. /**
  4722. * @brief Disable C1 APB2 peripherals clock during Low Power (Sleep) mode.
  4723. * @rmtoll APB2LPENR TIM1LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4724. * APB2LPENR TIM8LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4725. * APB2LPENR USART1LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4726. * APB2LPENR UART9LPEN LL_C1_APB2_GRP1_DisableClockSleep\n (*)
  4727. * APB2LPENR USART10LPEN LL_C1_APB2_GRP1_DisableClockSleep\n (*)
  4728. * APB2LPENR USART6LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4729. * APB2LPENR SPI1LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4730. * APB2LPENR SPI4LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4731. * APB2LPENR TIM15LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4732. * APB2LPENR TIM16LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4733. * APB2LPENR TIM17LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4734. * APB2LPENR SPI5LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4735. * APB2LPENR SAI1LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4736. * APB2LPENR SAI2LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4737. * APB2LPENR SAI3LPEN LL_C1_APB2_GRP1_DisableClockSleep\n (*)
  4738. * APB2LPENR DFSDM1LPEN LL_C1_APB2_GRP1_DisableClockSleep\n
  4739. * APB2LPENR HRTIMLPEN LL_C1_APB2_GRP1_DisableClockSleep (*)
  4740. * @param Periphs This parameter can be a combination of the following values:
  4741. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  4742. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  4743. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  4744. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  4745. * @arg @ref LL_APB2_GRP1_PERIPH_UART9 (*)
  4746. * @arg @ref LL_APB2_GRP1_PERIPH_USART10 (*)
  4747. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  4748. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  4749. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  4750. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  4751. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  4752. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  4753. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  4754. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  4755. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  4756. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  4757. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  4758. *
  4759. * (*) value not defined in all devices.
  4760. * @retval None
  4761. */
  4762. __STATIC_INLINE void LL_C1_APB2_GRP1_DisableClockSleep(uint32_t Periphs)
  4763. {
  4764. CLEAR_BIT(RCC_C1->APB2LPENR, Periphs);
  4765. }
  4766. /**
  4767. * @}
  4768. */
  4769. /** @addtogroup BUS_LL_EF_APB4 APB4
  4770. * @{
  4771. */
  4772. /**
  4773. * @brief Enable C1 APB4 peripherals clock.
  4774. * @rmtoll APB4ENR SYSCFGEN LL_C1_APB4_GRP1_EnableClock\n
  4775. * APB4ENR LPUART1EN LL_C1_APB4_GRP1_EnableClock\n
  4776. * APB4ENR SPI6EN LL_C1_APB4_GRP1_EnableClock\n
  4777. * APB4ENR I2C4EN LL_C1_APB4_GRP1_EnableClock\n
  4778. * APB4ENR LPTIM2EN LL_C1_APB4_GRP1_EnableClock\n
  4779. * APB4ENR LPTIM3EN LL_C1_APB4_GRP1_EnableClock\n
  4780. * APB4ENR LPTIM4EN LL_C1_APB4_GRP1_EnableClock\n (*)
  4781. * APB4ENR LPTIM5EN LL_C1_APB4_GRP1_EnableClock\n (*)
  4782. * APB4ENR DAC2EN LL_C1_APB4_GRP1_EnableClock\n (*)
  4783. * APB4ENR COMP12EN LL_C1_APB4_GRP1_EnableClock\n
  4784. * APB4ENR VREFEN LL_C1_APB4_GRP1_EnableClock\n
  4785. * APB4ENR RTCAPBEN LL_C1_APB4_GRP1_EnableClock\n
  4786. * APB4ENR SAI4EN LL_C1_APB4_GRP1_EnableClock\n (*)
  4787. * APB4ENR DTSEN LL_C1_APB4_GRP1_EnableClock\n (*)
  4788. * APB4ENR DFSDM2EN LL_C1_APB4_GRP1_EnableClock (*)
  4789. * @param Periphs This parameter can be a combination of the following values:
  4790. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  4791. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  4792. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  4793. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  4794. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  4795. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  4796. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  4797. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  4798. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  4799. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  4800. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  4801. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  4802. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  4803. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  4804. *
  4805. * (*) value not defined in all devices.
  4806. * @retval None
  4807. */
  4808. __STATIC_INLINE void LL_C1_APB4_GRP1_EnableClock(uint32_t Periphs)
  4809. {
  4810. __IO uint32_t tmpreg;
  4811. SET_BIT(RCC_C1->APB4ENR, Periphs);
  4812. /* Delay after an RCC peripheral clock enabling */
  4813. tmpreg = READ_BIT(RCC_C1->APB4ENR, Periphs);
  4814. (void)tmpreg;
  4815. }
  4816. /**
  4817. * @brief Check if C1 APB4 peripheral clock is enabled or not
  4818. * @rmtoll APB4ENR SYSCFGEN LL_C1_APB4_GRP1_IsEnabledClock\n
  4819. * APB4ENR LPUART1EN LL_C1_APB4_GRP1_IsEnabledClock\n
  4820. * APB4ENR SPI6EN LL_C1_APB4_GRP1_IsEnabledClock\n
  4821. * APB4ENR I2C4EN LL_C1_APB4_GRP1_IsEnabledClock\n
  4822. * APB4ENR LPTIM2EN LL_C1_APB4_GRP1_IsEnabledClock\n
  4823. * APB4ENR LPTIM3EN LL_C1_APB4_GRP1_IsEnabledClock\n
  4824. * APB4ENR LPTIM4EN LL_C1_APB4_GRP1_IsEnabledClock\n (*)
  4825. * APB4ENR LPTIM5EN LL_C1_APB4_GRP1_IsEnabledClock\n (*)
  4826. * APB4ENR COMP12EN LL_C1_APB4_GRP1_IsEnabledClock\n
  4827. * APB4ENR VREFEN LL_C1_APB4_GRP1_IsEnabledClock\n
  4828. * APB4ENR RTCAPBEN LL_C1_APB4_GRP1_IsEnabledClock\n
  4829. * APB4ENR SAI4EN LL_C1_APB4_GRP1_IsEnabledClock\n (*)
  4830. * APB4ENR DTSEN LL_C1_APB4_GRP1_IsEnabledClock\n (*)
  4831. * APB4ENR DFSDM2EN LL_C1_APB4_GRP1_IsEnabledClock (*)
  4832. * @param Periphs This parameter can be a combination of the following values:
  4833. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  4834. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  4835. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  4836. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  4837. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  4838. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  4839. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  4840. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  4841. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  4842. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  4843. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  4844. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  4845. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  4846. *
  4847. * (*) value not defined in all devices.
  4848. * @retval uint32_t
  4849. */
  4850. __STATIC_INLINE uint32_t LL_C1_APB4_GRP1_IsEnabledClock(uint32_t Periphs)
  4851. {
  4852. return ((READ_BIT(RCC_C1->APB4ENR, Periphs) == Periphs) ? 1U : 0U);
  4853. }
  4854. /**
  4855. * @brief Disable C1 APB4 peripherals clock.
  4856. * @rmtoll APB4ENR SYSCFGEN LL_C1_APB4_GRP1_DisableClock\n
  4857. * APB4ENR LPUART1EN LL_C1_APB4_GRP1_DisableClock\n
  4858. * APB4ENR SPI6EN LL_C1_APB4_GRP1_DisableClock\n
  4859. * APB4ENR I2C4EN LL_C1_APB4_GRP1_DisableClock\n
  4860. * APB4ENR LPTIM2EN LL_C1_APB4_GRP1_DisableClock\n
  4861. * APB4ENR LPTIM3EN LL_C1_APB4_GRP1_DisableClock\n
  4862. * APB4ENR LPTIM4EN LL_C1_APB4_GRP1_DisableClock\n (*)
  4863. * APB4ENR LPTIM5EN LL_C1_APB4_GRP1_DisableClock\n (*)
  4864. * APB4ENR COMP12EN LL_C1_APB4_GRP1_DisableClock\n
  4865. * APB4ENR VREFEN LL_C1_APB4_GRP1_DisableClock\n
  4866. * APB4ENR RTCAPBEN LL_C1_APB4_GRP1_DisableClock\n
  4867. * APB4ENR SAI4EN LL_C1_APB4_GRP1_DisableClock\n (*)
  4868. * APB4ENR DTSEN LL_C1_APB4_GRP1_DisableClock\n (*)
  4869. * APB4ENR DFSDM2EN LL_C1_APB4_GRP1_DisableClock (*)
  4870. * @param Periphs This parameter can be a combination of the following values:
  4871. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  4872. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  4873. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  4874. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  4875. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  4876. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  4877. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  4878. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  4879. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  4880. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  4881. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  4882. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  4883. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  4884. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  4885. *
  4886. * (*) value not defined in all devices.
  4887. * @retval None
  4888. */
  4889. __STATIC_INLINE void LL_C1_APB4_GRP1_DisableClock(uint32_t Periphs)
  4890. {
  4891. CLEAR_BIT(RCC_C1->APB4ENR, Periphs);
  4892. }
  4893. /**
  4894. * @brief Enable C1 APB4 peripherals clock during Low Power (Sleep) mode.
  4895. * @rmtoll APB4LPENR SYSCFGLPEN LL_C1_APB4_GRP1_EnableClockSleep\n
  4896. * APB4LPENR LPUART1LPEN LL_C1_APB4_GRP1_EnableClockSleep\n
  4897. * APB4LPENR SPI6LPEN LL_C1_APB4_GRP1_EnableClockSleep\n
  4898. * APB4LPENR I2C4LPEN LL_C1_APB4_GRP1_EnableClockSleep\n
  4899. * APB4LPENR LPTIM2LPEN LL_C1_APB4_GRP1_EnableClockSleep\n
  4900. * APB4LPENR LPTIM3LPEN LL_C1_APB4_GRP1_EnableClockSleep\n (*)
  4901. * APB4LPENR LPTIM4LPEN LL_C1_APB4_GRP1_EnableClockSleep\n (*)
  4902. * APB4LPENR LPTIM5LPEN LL_C1_APB4_GRP1_EnableClockSleep\n
  4903. * APB4LPENR COMP12LPEN LL_C1_APB4_GRP1_EnableClockSleep\n
  4904. * APB4LPENR VREFLPEN LL_C1_APB4_GRP1_EnableClockSleep\n
  4905. * APB4LPENR RTCAPBLPEN LL_C1_APB4_GRP1_EnableClockSleep\n
  4906. * APB4LPENR SAI4LPEN LL_C1_APB4_GRP1_EnableClockSleep\n (*)
  4907. * APB4ENR DTSLPEN LL_C1_APB4_GRP1_EnableClockSleep\n (*)
  4908. * APB4ENR DFSDM2LPEN LL_C1_APB4_GRP1_EnableClockSleep (*)
  4909. * @param Periphs This parameter can be a combination of the following values:
  4910. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  4911. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  4912. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  4913. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  4914. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  4915. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  4916. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  4917. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  4918. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  4919. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  4920. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  4921. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  4922. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  4923. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  4924. *
  4925. * (*) value not defined in all devices.
  4926. * @retval None
  4927. */
  4928. __STATIC_INLINE void LL_C1_APB4_GRP1_EnableClockSleep(uint32_t Periphs)
  4929. {
  4930. __IO uint32_t tmpreg;
  4931. SET_BIT(RCC_C1->APB4LPENR, Periphs);
  4932. /* Delay after an RCC peripheral clock enabling */
  4933. tmpreg = READ_BIT(RCC_C1->APB4LPENR, Periphs);
  4934. (void)tmpreg;
  4935. }
  4936. /**
  4937. * @brief Disable C1 APB4 peripherals clock during Low Power (Sleep) mode.
  4938. * @rmtoll APB4LPENR SYSCFGLPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4939. * APB4LPENR LPUART1LPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4940. * APB4LPENR SPI6LPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4941. * APB4LPENR I2C4LPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4942. * APB4LPENR LPTIM2LPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4943. * APB4LPENR LPTIM3LPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4944. * APB4LPENR LPTIM4LPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4945. * APB4LPENR LPTIM5LPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4946. * APB4LPENR COMP12LPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4947. * APB4LPENR VREFLPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4948. * APB4LPENR RTCAPBLPEN LL_C1_APB4_GRP1_DisableClockSleep\n
  4949. * APB4LPENR SAI4LPEN LL_C1_APB4_GRP1_DisableClockSleep\n (*)
  4950. * APB4ENR DTSLPEN LL_C1_APB4_GRP1_DisableClockSleep\n (*)
  4951. * APB4ENR DFSDM2LPEN LL_C1_APB4_GRP1_DisableClockSleep (*)
  4952. * @param Periphs This parameter can be a combination of the following values:
  4953. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  4954. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  4955. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  4956. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  4957. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  4958. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  4959. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  4960. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  4961. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  4962. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  4963. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  4964. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  4965. * @arg @ref LL_APB4_GRP1_PERIPH_DTS (*)
  4966. * @arg @ref LL_APB4_GRP1_PERIPH_DFSDM2 (*)
  4967. *
  4968. * (*) value not defined in all devices.
  4969. * @retval None
  4970. */
  4971. __STATIC_INLINE void LL_C1_APB4_GRP1_DisableClockSleep(uint32_t Periphs)
  4972. {
  4973. CLEAR_BIT(RCC_C1->APB4LPENR, Periphs);
  4974. }
  4975. /**
  4976. * @}
  4977. */
  4978. /** @addtogroup BUS_LL_EF_AHB3 AHB3
  4979. * @{
  4980. */
  4981. /**
  4982. * @brief Enable C2 AHB3 peripherals clock.
  4983. * @rmtoll AHB3ENR MDMAEN LL_C2_AHB3_GRP1_EnableClock\n
  4984. * AHB3ENR DMA2DEN LL_C2_AHB3_GRP1_EnableClock\n
  4985. * AHB3ENR JPGDECEN LL_C2_AHB3_GRP1_EnableClock\n
  4986. * AHB3ENR FMCEN LL_C2_AHB3_GRP1_EnableClock\n
  4987. * AHB3ENR QSPIEN LL_C2_AHB3_GRP1_EnableClock\n
  4988. * AHB3ENR SDMMC1EN LL_C2_AHB3_GRP1_EnableClock\n
  4989. * AHB3ENR FLASHEN LL_C2_AHB3_GRP1_EnableClock\n
  4990. * AHB3ENR DTCM1EN LL_C2_AHB3_GRP1_EnableClock\n
  4991. * AHB3ENR DTCM2EN LL_C2_AHB3_GRP1_EnableClock\n
  4992. * AHB3ENR ITCMEN LL_C2_AHB3_GRP1_EnableClock\n
  4993. * AHB3ENR AXISRAMEN LL_C2_AHB3_GRP1_EnableClock
  4994. * @param Periphs This parameter can be a combination of the following values:
  4995. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  4996. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  4997. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  4998. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  4999. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  5000. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  5001. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH
  5002. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1
  5003. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2
  5004. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM
  5005. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  5006. * @retval None
  5007. */
  5008. __STATIC_INLINE void LL_C2_AHB3_GRP1_EnableClock(uint32_t Periphs)
  5009. {
  5010. __IO uint32_t tmpreg;
  5011. SET_BIT(RCC_C2->AHB3ENR, Periphs);
  5012. /* Delay after an RCC peripheral clock enabling */
  5013. tmpreg = READ_BIT(RCC_C2->AHB3ENR, Periphs);
  5014. (void)tmpreg;
  5015. }
  5016. /**
  5017. * @brief Check if C2 AHB3 peripheral clock is enabled or not
  5018. * @rmtoll AHB3ENR MDMAEN LL_C2_AHB3_GRP1_IsEnabledClock\n
  5019. * AHB3ENR DMA2DEN LL_C2_AHB3_GRP1_IsEnabledClock\n
  5020. * AHB3ENR JPGDECEN LL_C2_AHB3_GRP1_IsEnabledClock\n
  5021. * AHB3ENR FMCEN LL_C2_AHB3_GRP1_IsEnabledClock\n
  5022. * AHB3ENR QSPIEN LL_C2_AHB3_GRP1_IsEnabledClock\n
  5023. * AHB3ENR SDMMC1EN LL_C2_AHB3_GRP1_IsEnabledClock\n
  5024. * AHB3ENR FLASHEN LL_C2_AHB3_GRP1_IsEnabledClock\n
  5025. * AHB3ENR DTCM1EN LL_C2_AHB3_GRP1_IsEnabledClock\n
  5026. * AHB3ENR DTCM2EN LL_C2_AHB3_GRP1_IsEnabledClock\n
  5027. * AHB3ENR ITCMEN LL_C2_AHB3_GRP1_IsEnabledClock\n
  5028. * AHB3ENR AXISRAMEN LL_C2_AHB3_GRP1_IsEnabledClock
  5029. * @param Periphs This parameter can be a combination of the following values:
  5030. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  5031. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  5032. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  5033. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  5034. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  5035. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  5036. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH
  5037. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1
  5038. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2
  5039. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM
  5040. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  5041. * @retval uint32_t
  5042. */
  5043. __STATIC_INLINE uint32_t LL_C2_AHB3_GRP1_IsEnabledClock(uint32_t Periphs)
  5044. {
  5045. return ((READ_BIT(RCC_C2->AHB3ENR, Periphs) == Periphs) ? 1U : 0U);
  5046. }
  5047. /**
  5048. * @brief Disable C2 AHB3 peripherals clock.
  5049. * @rmtoll AHB3ENR MDMAEN LL_C2_AHB3_GRP1_DisableClock\n
  5050. * AHB3ENR DMA2DEN LL_C2_AHB3_GRP1_DisableClock\n
  5051. * AHB3ENR JPGDECEN LL_C2_AHB3_GRP1_DisableClock\n
  5052. * AHB3ENR FMCEN LL_C2_AHB3_GRP1_DisableClock\n
  5053. * AHB3ENR QSPIEN LL_C2_AHB3_GRP1_DisableClock\n
  5054. * AHB3ENR SDMMC1EN LL_C2_AHB3_GRP1_DisableClock\n
  5055. * AHB3ENR FLASHEN LL_C2_AHB3_GRP1_DisableClock\n
  5056. * AHB3ENR DTCM1EN LL_C2_AHB3_GRP1_DisableClock\n
  5057. * AHB3ENR DTCM2EN LL_C2_AHB3_GRP1_DisableClock\n
  5058. * AHB3ENR ITCMEN LL_C2_AHB3_GRP1_DisableClock\n
  5059. * AHB3ENR AXISRAMEN LL_C2_AHB3_GRP1_DisableClock
  5060. * @param Periphs This parameter can be a combination of the following values:
  5061. * @arg @ref LL_AHB3_GRP1_PERIPH_MDMA
  5062. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  5063. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  5064. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  5065. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  5066. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  5067. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH
  5068. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1
  5069. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2
  5070. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM
  5071. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  5072. * @retval None
  5073. */
  5074. __STATIC_INLINE void LL_C2_AHB3_GRP1_DisableClock(uint32_t Periphs)
  5075. {
  5076. CLEAR_BIT(RCC_C2->AHB3ENR, Periphs);
  5077. }
  5078. /**
  5079. * @brief Enable C2 AHB3 peripherals clock during Low Power (Sleep) mode.
  5080. * @rmtoll AHB3LPENR MDMALPEN LL_C2_AHB3_GRP1_EnableClockSleep\n
  5081. * AHB3LPENR DMA2DLPEN LL_C2_AHB3_GRP1_EnableClockSleep\n
  5082. * AHB3LPENR JPGDECLPEN LL_C2_AHB3_GRP1_EnableClockSleep\n
  5083. * AHB3LPENR FMCLPEN LL_C2_AHB3_GRP1_EnableClockSleep\n
  5084. * AHB3LPENR QSPILPEN LL_C2_AHB3_GRP1_EnableClockSleep\n
  5085. * AHB3LPENR SDMMC1LPEN LL_C2_AHB3_GRP1_EnableClockSleep\n
  5086. * AHB3LPENR FLASHLPEN LL_C2_AHB3_GRP1_EnableClockSleep\n
  5087. * AHB3LPENR DTCM1LPEN LL_C2_AHB3_GRP1_EnableClockSleep\n
  5088. * AHB3LPENR DTCM2LPEN LL_C2_AHB3_GRP1_EnableClockSleep\n
  5089. * AHB3LPENR ITCMLPEN LL_C2_AHB3_GRP1_EnableClockSleep\n
  5090. * AHB3LPENR AXISRAMLPEN LL_C2_AHB3_GRP1_EnableClockSleep
  5091. * @param Periphs This parameter can be a combination of the following values:
  5092. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  5093. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  5094. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  5095. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  5096. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  5097. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH
  5098. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1
  5099. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2
  5100. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM
  5101. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  5102. * @retval None
  5103. */
  5104. __STATIC_INLINE void LL_C2_AHB3_GRP1_EnableClockSleep(uint32_t Periphs)
  5105. {
  5106. __IO uint32_t tmpreg;
  5107. SET_BIT(RCC_C2->AHB3LPENR, Periphs);
  5108. /* Delay after an RCC peripheral clock enabling */
  5109. tmpreg = READ_BIT(RCC_C2->AHB3LPENR, Periphs);
  5110. (void)tmpreg;
  5111. }
  5112. /**
  5113. * @brief Disable C2 AHB3 peripherals clock during Low Power (Sleep) mode.
  5114. * @rmtoll AHB3LPENR MDMALPEN LL_C2_AHB3_GRP1_DisableClockSleep\n
  5115. * AHB3LPENR DMA2DLPEN LL_C2_AHB3_GRP1_DisableClockSleep\n
  5116. * AHB3LPENR JPGDECLPEN LL_C2_AHB3_GRP1_DisableClockSleep\n
  5117. * AHB3LPENR FMCLPEN LL_C2_AHB3_GRP1_DisableClockSleep\n
  5118. * AHB3LPENR QSPILPEN LL_C2_AHB3_GRP1_DisableClockSleep\n
  5119. * AHB3LPENR SDMMC1LPEN LL_C2_AHB3_GRP1_DisableClockSleep\n
  5120. * AHB3LPENR FLASHLPEN LL_C2_AHB3_GRP1_DisableClockSleep\n
  5121. * AHB3LPENR DTCM1LPEN LL_C2_AHB3_GRP1_DisableClockSleep\n
  5122. * AHB3LPENR DTCM2LPEN LL_C2_AHB3_GRP1_DisableClockSleep\n
  5123. * AHB3LPENR ITCMLPEN LL_C2_AHB3_GRP1_DisableClockSleep\n
  5124. * AHB3LPENR AXISRAMLPEN LL_C2_AHB3_GRP1_DisableClockSleep
  5125. * @param Periphs This parameter can be a combination of the following values:
  5126. * @arg @ref LL_AHB3_GRP1_PERIPH_DMA2D
  5127. * @arg @ref LL_AHB3_GRP1_PERIPH_JPGDEC (*)
  5128. * @arg @ref LL_AHB3_GRP1_PERIPH_FMC
  5129. * @arg @ref LL_AHB3_GRP1_PERIPH_QSPI (*)
  5130. * @arg @ref LL_AHB3_GRP1_PERIPH_SDMMC1
  5131. * @arg @ref LL_AHB3_GRP1_PERIPH_FLASH
  5132. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM1
  5133. * @arg @ref LL_AHB3_GRP1_PERIPH_DTCM2
  5134. * @arg @ref LL_AHB3_GRP1_PERIPH_ITCM
  5135. * @arg @ref LL_AHB3_GRP1_PERIPH_AXISRAM
  5136. * @retval None
  5137. */
  5138. __STATIC_INLINE void LL_C2_AHB3_GRP1_DisableClockSleep(uint32_t Periphs)
  5139. {
  5140. CLEAR_BIT(RCC_C2->AHB3LPENR, Periphs);
  5141. }
  5142. /**
  5143. * @}
  5144. */
  5145. /** @addtogroup BUS_LL_EF_AHB1 AHB1
  5146. * @{
  5147. */
  5148. /**
  5149. * @brief Enable C2 AHB1 peripherals clock.
  5150. * @rmtoll AHB1ENR DMA1EN LL_C2_AHB1_GRP1_EnableClock\n
  5151. * AHB1ENR DMA2EN LL_C2_AHB1_GRP1_EnableClock\n
  5152. * AHB1ENR ADC12EN LL_C2_AHB1_GRP1_EnableClock\n
  5153. * AHB1ENR ARTEN LL_C2_AHB1_GRP1_EnableClock\n
  5154. * AHB1ENR ETH1MACEN LL_C2_AHB1_GRP1_EnableClock\n
  5155. * AHB1ENR ETH1TXEN LL_C2_AHB1_GRP1_EnableClock\n
  5156. * AHB1ENR ETH1RXEN LL_C2_AHB1_GRP1_EnableClock\n
  5157. * AHB1ENR USB1OTGHSEN LL_C2_AHB1_GRP1_EnableClock\n
  5158. * AHB1ENR USB1OTGHSULPIEN LL_C2_AHB1_GRP1_EnableClock\n
  5159. * AHB1ENR USB2OTGHSEN LL_C2_AHB1_GRP1_EnableClock\n
  5160. * AHB1ENR USB2OTGHSULPIEN LL_C2_AHB1_GRP1_EnableClock
  5161. * @param Periphs This parameter can be a combination of the following values:
  5162. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  5163. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  5164. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  5165. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  5166. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  5167. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  5168. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  5169. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  5170. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  5171. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  5172. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  5173. *
  5174. * (*) value not defined in all devices.
  5175. * @retval None
  5176. */
  5177. __STATIC_INLINE void LL_C2_AHB1_GRP1_EnableClock(uint32_t Periphs)
  5178. {
  5179. __IO uint32_t tmpreg;
  5180. SET_BIT(RCC_C2->AHB1ENR, Periphs);
  5181. /* Delay after an RCC peripheral clock enabling */
  5182. tmpreg = READ_BIT(RCC_C2->AHB1ENR, Periphs);
  5183. (void)tmpreg;
  5184. }
  5185. /**
  5186. * @brief Check if C2 AHB1 peripheral clock is enabled or not
  5187. * @rmtoll AHB1ENR DMA1EN LL_C2_AHB1_GRP1_IsEnabledClock\n
  5188. * AHB1ENR DMA2EN LL_C2_AHB1_GRP1_IsEnabledClock\n
  5189. * AHB1ENR ADC12EN LL_C2_AHB1_GRP1_IsEnabledClock\n
  5190. * AHB1ENR ARTEN LL_C2_AHB1_GRP1_IsEnabledClock\n
  5191. * AHB1ENR ETH1MACEN LL_C2_AHB1_GRP1_IsEnabledClock\n
  5192. * AHB1ENR ETH1TXEN LL_C2_AHB1_GRP1_IsEnabledClock\n
  5193. * AHB1ENR ETH1RXEN LL_C2_AHB1_GRP1_IsEnabledClock\n
  5194. * AHB1ENR USB1OTGHSEN LL_C2_AHB1_GRP1_IsEnabledClock\n
  5195. * AHB1ENR USB1OTGHSULPIEN LL_C2_AHB1_GRP1_IsEnabledClock\n
  5196. * AHB1ENR USB2OTGHSEN LL_C2_AHB1_GRP1_IsEnabledClock\n
  5197. * AHB1ENR USB2OTGHSULPIEN LL_C2_AHB1_GRP1_IsEnabledClock
  5198. * @param Periphs This parameter can be a combination of the following values:
  5199. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  5200. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  5201. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  5202. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  5203. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  5204. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  5205. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  5206. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  5207. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  5208. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  5209. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  5210. *
  5211. * (*) value not defined in all devices.
  5212. * @retval uint32_t
  5213. */
  5214. __STATIC_INLINE uint32_t LL_C2_AHB1_GRP1_IsEnabledClock(uint32_t Periphs)
  5215. {
  5216. return ((READ_BIT(RCC_C2->AHB1ENR, Periphs) == Periphs) ? 1U : 0U);
  5217. }
  5218. /**
  5219. * @brief Disable C2 AHB1 peripherals clock.
  5220. * @rmtoll AHB1ENR DMA1EN LL_C2_AHB1_GRP1_DisableClock\n
  5221. * AHB1ENR DMA2EN LL_C2_AHB1_GRP1_DisableClock\n
  5222. * AHB1ENR ADC12EN LL_C2_AHB1_GRP1_DisableClock\n
  5223. * AHB1ENR ARTEN LL_C2_AHB1_GRP1_DisableClock\n
  5224. * AHB1ENR ETH1MACEN LL_C2_AHB1_GRP1_DisableClock\n
  5225. * AHB1ENR ETH1TXEN LL_C2_AHB1_GRP1_DisableClock\n
  5226. * AHB1ENR ETH1RXEN LL_C2_AHB1_GRP1_DisableClock\n
  5227. * AHB1ENR USB1OTGHSEN LL_C2_AHB1_GRP1_DisableClock\n
  5228. * AHB1ENR USB1OTGHSULPIEN LL_C2_AHB1_GRP1_DisableClock\n
  5229. * AHB1ENR USB2OTGHSEN LL_C2_AHB1_GRP1_DisableClock\n
  5230. * AHB1ENR USB2OTGHSULPIEN LL_C2_AHB1_GRP1_DisableClock
  5231. * @param Periphs This parameter can be a combination of the following values:
  5232. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  5233. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  5234. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  5235. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  5236. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  5237. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  5238. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  5239. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  5240. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  5241. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  5242. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  5243. *
  5244. * (*) value not defined in all devices.
  5245. * @retval None
  5246. */
  5247. __STATIC_INLINE void LL_C2_AHB1_GRP1_DisableClock(uint32_t Periphs)
  5248. {
  5249. CLEAR_BIT(RCC_C2->AHB1ENR, Periphs);
  5250. }
  5251. /**
  5252. * @brief Enable C2 AHB1 peripherals clock during Low Power (Sleep) mode.
  5253. * @rmtoll AHB1LPENR DMA1LPEN LL_C2_AHB1_GRP1_EnableClockSleep\n
  5254. * AHB1LPENR DMA2LPEN LL_C2_AHB1_GRP1_EnableClockSleep\n
  5255. * AHB1LPENR ADC12LPEN LL_C2_AHB1_GRP1_EnableClockSleep\n
  5256. * AHB1LPENR ARTLPEN LL_C2_AHB1_GRP1_EnableClockSleep\n
  5257. * AHB1LPENR ETH1MACLPEN LL_C2_AHB1_GRP1_EnableClockSleep\n
  5258. * AHB1LPENR ETH1TXLPEN LL_C2_AHB1_GRP1_EnableClockSleep\n
  5259. * AHB1LPENR ETH1RXLPEN LL_C2_AHB1_GRP1_EnableClockSleep\n
  5260. * AHB1LPENR USB1OTGHSLPEN LL_C2_AHB1_GRP1_EnableClockSleep\n
  5261. * AHB1LPENR USB1OTGHSULPILPEN LL_C2_AHB1_GRP1_EnableClockSleep\n
  5262. * AHB1LPENR USB2OTGHSLPEN LL_C2_AHB1_GRP1_EnableClockSleep\n
  5263. * AHB1LPENR USB2OTGHSULPILPEN LL_C2_AHB1_GRP1_EnableClockSleep
  5264. * @param Periphs This parameter can be a combination of the following values:
  5265. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  5266. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  5267. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  5268. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  5269. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  5270. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  5271. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  5272. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  5273. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  5274. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  5275. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  5276. *
  5277. * (*) value not defined in all devices.
  5278. * @retval None
  5279. */
  5280. __STATIC_INLINE void LL_C2_AHB1_GRP1_EnableClockSleep(uint32_t Periphs)
  5281. {
  5282. __IO uint32_t tmpreg;
  5283. SET_BIT(RCC_C2->AHB1LPENR, Periphs);
  5284. /* Delay after an RCC peripheral clock enabling */
  5285. tmpreg = READ_BIT(RCC_C2->AHB1LPENR, Periphs);
  5286. (void)tmpreg;
  5287. }
  5288. /**
  5289. * @brief Disable C2 AHB1 peripherals clock during Low Power (Sleep) mode.
  5290. * @rmtoll AHB1LPENR DMA1LPEN LL_C2_AHB1_GRP1_DisableClockSleep\n
  5291. * AHB1LPENR DMA2LPEN LL_C2_AHB1_GRP1_DisableClockSleep\n
  5292. * AHB1LPENR ADC12LPEN LL_C2_AHB1_GRP1_DisableClockSleep\n
  5293. * AHB1LPENR ARTLPEN LL_C2_AHB1_GRP1_DisableClockSleep\n
  5294. * AHB1LPENR ETH1MACLPEN LL_C2_AHB1_GRP1_DisableClockSleep\n
  5295. * AHB1LPENR ETH1TXLPEN LL_C2_AHB1_GRP1_DisableClockSleep\n
  5296. * AHB1LPENR ETH1RXLPEN LL_C2_AHB1_GRP1_DisableClockSleep\n
  5297. * AHB1LPENR USB1OTGHSLPEN LL_C2_AHB1_GRP1_DisableClockSleep\n
  5298. * AHB1LPENR USB1OTGHSULPILPEN LL_C2_AHB1_GRP1_DisableClockSleep\n
  5299. * AHB1LPENR USB2OTGHSLPEN LL_C2_AHB1_GRP1_DisableClockSleep\n
  5300. * AHB1LPENR USB2OTGHSULPILPEN LL_C2_AHB1_GRP1_DisableClockSleep
  5301. * @param Periphs This parameter can be a combination of the following values:
  5302. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA1
  5303. * @arg @ref LL_AHB1_GRP1_PERIPH_DMA2
  5304. * @arg @ref LL_AHB1_GRP1_PERIPH_ADC12
  5305. * @arg @ref LL_AHB1_GRP1_PERIPH_ART (*)
  5306. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1MAC (*)
  5307. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1TX (*)
  5308. * @arg @ref LL_AHB1_GRP1_PERIPH_ETH1RX (*)
  5309. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHS
  5310. * @arg @ref LL_AHB1_GRP1_PERIPH_USB1OTGHSULPI
  5311. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHS (*)
  5312. * @arg @ref LL_AHB1_GRP1_PERIPH_USB2OTGHSULPI (*)
  5313. *
  5314. * (*) value not defined in all devices.
  5315. * @retval None
  5316. */
  5317. __STATIC_INLINE void LL_C2_AHB1_GRP1_DisableClockSleep(uint32_t Periphs)
  5318. {
  5319. CLEAR_BIT(RCC_C2->AHB1LPENR, Periphs);
  5320. }
  5321. /**
  5322. * @}
  5323. */
  5324. /** @addtogroup BUS_LL_EF_AHB2 AHB2
  5325. * @{
  5326. */
  5327. /**
  5328. * @brief Enable C2 AHB2 peripherals clock.
  5329. * @rmtoll AHB2ENR DCMIEN LL_C2_AHB2_GRP1_EnableClock\n
  5330. * AHB2ENR CRYPEN LL_C2_AHB2_GRP1_EnableClock\n
  5331. * AHB2ENR HASHEN LL_C2_AHB2_GRP1_EnableClock\n
  5332. * AHB2ENR RNGEN LL_C2_AHB2_GRP1_EnableClock\n
  5333. * AHB2ENR SDMMC2EN LL_C2_AHB2_GRP1_EnableClock
  5334. * @param Periphs This parameter can be a combination of the following values:
  5335. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  5336. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  5337. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  5338. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  5339. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  5340. *
  5341. * (*) value not defined in all devices.
  5342. * @retval None
  5343. */
  5344. __STATIC_INLINE void LL_C2_AHB2_GRP1_EnableClock(uint32_t Periphs)
  5345. {
  5346. __IO uint32_t tmpreg;
  5347. SET_BIT(RCC_C2->AHB2ENR, Periphs);
  5348. /* Delay after an RCC peripheral clock enabling */
  5349. tmpreg = READ_BIT(RCC_C2->AHB2ENR, Periphs);
  5350. (void)tmpreg;
  5351. }
  5352. /**
  5353. * @brief Check if C2 AHB2 peripheral clock is enabled or not
  5354. * @rmtoll AHB2ENR DCMIEN LL_C2_AHB2_GRP1_IsEnabledClock\n
  5355. * AHB2ENR CRYPEN LL_C2_AHB2_GRP1_IsEnabledClock\n
  5356. * AHB2ENR HASHEN LL_C2_AHB2_GRP1_IsEnabledClock\n
  5357. * AHB2ENR RNGEN LL_C2_AHB2_GRP1_IsEnabledClock\n
  5358. * AHB2ENR SDMMC2EN LL_C2_AHB2_GRP1_IsEnabledClock
  5359. * @param Periphs This parameter can be a combination of the following values:
  5360. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  5361. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  5362. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  5363. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  5364. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  5365. *
  5366. * (*) value not defined in all devices.
  5367. * @retval uint32_t
  5368. */
  5369. __STATIC_INLINE uint32_t LL_C2_AHB2_GRP1_IsEnabledClock(uint32_t Periphs)
  5370. {
  5371. return ((READ_BIT(RCC_C2->AHB2ENR, Periphs) == Periphs) ? 1U : 0U);
  5372. }
  5373. /**
  5374. * @brief Disable C2 AHB2 peripherals clock.
  5375. * @rmtoll AHB2ENR DCMIEN LL_C2_AHB2_GRP1_DisableClock\n
  5376. * AHB2ENR CRYPEN LL_C2_AHB2_GRP1_DisableClock\n
  5377. * AHB2ENR HASHEN LL_C2_AHB2_GRP1_DisableClock\n
  5378. * AHB2ENR RNGEN LL_C2_AHB2_GRP1_DisableClock\n
  5379. * AHB2ENR SDMMC2EN LL_C2_AHB2_GRP1_DisableClock
  5380. * @param Periphs This parameter can be a combination of the following values:
  5381. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  5382. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  5383. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  5384. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  5385. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  5386. *
  5387. * (*) value not defined in all devices.
  5388. * @retval None
  5389. */
  5390. __STATIC_INLINE void LL_C2_AHB2_GRP1_DisableClock(uint32_t Periphs)
  5391. {
  5392. CLEAR_BIT(RCC_C2->AHB2ENR, Periphs);
  5393. }
  5394. /**
  5395. * @brief Enable C2 AHB2 peripherals clock during Low Power (Sleep) mode.
  5396. * @rmtoll AHB2LPENR DCMILPEN LL_C2_AHB2_GRP1_EnableClockSleep\n
  5397. * AHB2LPENR CRYPLPEN LL_C2_AHB2_GRP1_EnableClockSleep\n
  5398. * AHB2LPENR HASHLPEN LL_C2_AHB2_GRP1_EnableClockSleep\n
  5399. * AHB2LPENR RNGLPEN LL_C2_AHB2_GRP1_EnableClockSleep\n
  5400. * AHB2LPENR SDMMC2LPEN LL_C2_AHB2_GRP1_EnableClockSleep\n
  5401. * AHB2LPENR D2SRAM1LPEN LL_C2_AHB2_GRP1_EnableClockSleep\n
  5402. * AHB2LPENR D2SRAM2LPEN LL_C2_AHB2_GRP1_EnableClockSleep\n
  5403. * AHB2LPENR D2SRAM3LPEN LL_C2_AHB2_GRP1_EnableClockSleep
  5404. * @param Periphs This parameter can be a combination of the following values:
  5405. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  5406. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  5407. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  5408. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  5409. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  5410. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  5411. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  5412. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  5413. *
  5414. * (*) value not defined in all devices.
  5415. * @retval None
  5416. */
  5417. __STATIC_INLINE void LL_C2_AHB2_GRP1_EnableClockSleep(uint32_t Periphs)
  5418. {
  5419. __IO uint32_t tmpreg;
  5420. SET_BIT(RCC_C2->AHB2LPENR, Periphs);
  5421. /* Delay after an RCC peripheral clock enabling */
  5422. tmpreg = READ_BIT(RCC_C2->AHB2LPENR, Periphs);
  5423. (void)tmpreg;
  5424. }
  5425. /**
  5426. * @brief Disable C2 AHB2 peripherals clock during Low Power (Sleep) mode.
  5427. * @rmtoll AHB2LPENR DCMILPEN LL_C2_AHB2_GRP1_DisableClockSleep\n
  5428. * AHB2LPENR CRYPLPEN LL_C2_AHB2_GRP1_DisableClockSleep\n
  5429. * AHB2LPENR HASHLPEN LL_C2_AHB2_GRP1_DisableClockSleep\n
  5430. * AHB2LPENR RNGLPEN LL_C2_AHB2_GRP1_DisableClockSleep\n
  5431. * AHB2LPENR SDMMC2LPEN LL_C2_AHB2_GRP1_DisableClockSleep\n
  5432. * AHB2LPENR D2SRAM1LPEN LL_C2_AHB2_GRP1_DisableClockSleep\n
  5433. * AHB2LPENR D2SRAM2LPEN LL_C2_AHB2_GRP1_DisableClockSleep\n
  5434. * AHB2LPENR D2SRAM3LPEN LL_C2_AHB2_GRP1_DisableClockSleep
  5435. * @param Periphs This parameter can be a combination of the following values:
  5436. * @arg @ref LL_AHB2_GRP1_PERIPH_DCMI
  5437. * @arg @ref LL_AHB2_GRP1_PERIPH_CRYP (*)
  5438. * @arg @ref LL_AHB2_GRP1_PERIPH_HASH (*)
  5439. * @arg @ref LL_AHB2_GRP1_PERIPH_RNG
  5440. * @arg @ref LL_AHB2_GRP1_PERIPH_SDMMC2
  5441. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM1
  5442. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM2
  5443. * @arg @ref LL_AHB2_GRP1_PERIPH_D2SRAM3 (*)
  5444. *
  5445. * (*) value not defined in all devices.
  5446. * @retval None
  5447. */
  5448. __STATIC_INLINE void LL_C2_AHB2_GRP1_DisableClockSleep(uint32_t Periphs)
  5449. {
  5450. CLEAR_BIT(RCC_C2->AHB2LPENR, Periphs);
  5451. }
  5452. /**
  5453. * @}
  5454. */
  5455. /** @addtogroup BUS_LL_EF_AHB4 AHB4
  5456. * @{
  5457. */
  5458. /**
  5459. * @brief Enable C2 AHB4 peripherals clock.
  5460. * @rmtoll AHB4ENR GPIOAEN LL_C2_AHB4_GRP1_EnableClock\n
  5461. * AHB4ENR GPIOBEN LL_C2_AHB4_GRP1_EnableClock\n
  5462. * AHB4ENR GPIOCEN LL_C2_AHB4_GRP1_EnableClock\n
  5463. * AHB4ENR GPIODEN LL_C2_AHB4_GRP1_EnableClock\n
  5464. * AHB4ENR GPIOEEN LL_C2_AHB4_GRP1_EnableClock\n
  5465. * AHB4ENR GPIOFEN LL_C2_AHB4_GRP1_EnableClock\n
  5466. * AHB4ENR GPIOGEN LL_C2_AHB4_GRP1_EnableClock\n
  5467. * AHB4ENR GPIOHEN LL_C2_AHB4_GRP1_EnableClock\n
  5468. * AHB4ENR GPIOIEN LL_C2_AHB4_GRP1_EnableClock\n
  5469. * AHB4ENR GPIOJEN LL_C2_AHB4_GRP1_EnableClock\n
  5470. * AHB4ENR GPIOKEN LL_C2_AHB4_GRP1_EnableClock\n
  5471. * AHB4ENR CRCEN LL_C2_AHB4_GRP1_EnableClock\n
  5472. * AHB4ENR BDMAEN LL_C2_AHB4_GRP1_EnableClock\n
  5473. * AHB4ENR ADC3EN LL_C2_AHB4_GRP1_EnableClock\n
  5474. * AHB4ENR HSEMEN LL_C2_AHB4_GRP1_EnableClock\n
  5475. * AHB4ENR BKPRAMEN LL_C2_AHB4_GRP1_EnableClock\n
  5476. * AHB4ENR SRAM4EN LL_C2_AHB4_GRP1_EnableClock
  5477. * @param Periphs This parameter can be a combination of the following values:
  5478. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  5479. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  5480. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  5481. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  5482. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  5483. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  5484. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  5485. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  5486. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  5487. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  5488. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  5489. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  5490. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  5491. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  5492. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  5493. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  5494. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  5495. *
  5496. * (*) value not defined in all devices.
  5497. * @retval None
  5498. */
  5499. __STATIC_INLINE void LL_C2_AHB4_GRP1_EnableClock(uint32_t Periphs)
  5500. {
  5501. __IO uint32_t tmpreg;
  5502. SET_BIT(RCC_C2->AHB4ENR, Periphs);
  5503. /* Delay after an RCC peripheral clock enabling */
  5504. tmpreg = READ_BIT(RCC_C2->AHB4ENR, Periphs);
  5505. (void)tmpreg;
  5506. }
  5507. /**
  5508. * @brief Check if C2 AHB4 peripheral clock is enabled or not
  5509. * @rmtoll AHB4ENR GPIOAEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5510. * AHB4ENR GPIOBEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5511. * AHB4ENR GPIOCEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5512. * AHB4ENR GPIODEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5513. * AHB4ENR GPIOEEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5514. * AHB4ENR GPIOFEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5515. * AHB4ENR GPIOGEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5516. * AHB4ENR GPIOHEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5517. * AHB4ENR GPIOIEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5518. * AHB4ENR GPIOJEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5519. * AHB4ENR GPIOKEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5520. * AHB4ENR CRCEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5521. * AHB4ENR BDMAEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5522. * AHB4ENR ADC3EN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5523. * AHB4ENR HSEMEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5524. * AHB4ENR BKPRAMEN LL_C2_AHB4_GRP1_IsEnabledClock\n
  5525. * AHB4ENR SRAM4EN LL_C2_AHB4_GRP1_IsEnabledClock
  5526. * @param Periphs This parameter can be a combination of the following values:
  5527. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  5528. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  5529. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  5530. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  5531. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  5532. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  5533. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  5534. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  5535. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  5536. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  5537. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  5538. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  5539. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  5540. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  5541. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  5542. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  5543. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  5544. *
  5545. * (*) value not defined in all devices.
  5546. * @retval uint32_t
  5547. */
  5548. __STATIC_INLINE uint32_t LL_C2_AHB4_GRP1_IsEnabledClock(uint32_t Periphs)
  5549. {
  5550. return ((READ_BIT(RCC_C2->AHB4ENR, Periphs) == Periphs) ? 1U : 0U);
  5551. }
  5552. /**
  5553. * @brief Disable C2 AHB4 peripherals clock.
  5554. * @rmtoll AHB4ENR GPIOAEN LL_C2_AHB4_GRP1_DisableClock\n
  5555. * AHB4ENR GPIOBEN LL_C2_AHB4_GRP1_DisableClock\n
  5556. * AHB4ENR GPIOCEN LL_C2_AHB4_GRP1_DisableClock\n
  5557. * AHB4ENR GPIODEN LL_C2_AHB4_GRP1_DisableClock\n
  5558. * AHB4ENR GPIOEEN LL_C2_AHB4_GRP1_DisableClock\n
  5559. * AHB4ENR GPIOFEN LL_C2_AHB4_GRP1_DisableClock\n
  5560. * AHB4ENR GPIOGEN LL_C2_AHB4_GRP1_DisableClock\n
  5561. * AHB4ENR GPIOHEN LL_C2_AHB4_GRP1_DisableClock\n
  5562. * AHB4ENR GPIOIEN LL_C2_AHB4_GRP1_DisableClock\n
  5563. * AHB4ENR GPIOJEN LL_C2_AHB4_GRP1_DisableClock\n
  5564. * AHB4ENR GPIOKEN LL_C2_AHB4_GRP1_DisableClock\n
  5565. * AHB4ENR CRCEN LL_C2_AHB4_GRP1_DisableClock\n
  5566. * AHB4ENR BDMAEN LL_C2_AHB4_GRP1_DisableClock\n
  5567. * AHB4ENR ADC3EN LL_C2_AHB4_GRP1_DisableClock\n
  5568. * AHB4ENR HSEMEN LL_C2_AHB4_GRP1_DisableClock\n
  5569. * AHB4ENR BKPRAMEN LL_C2_AHB4_GRP1_DisableClock\n
  5570. * AHB4ENR SRAM4EN LL_C2_AHB4_GRP1_DisableClock
  5571. * @param Periphs This parameter can be a combination of the following values:
  5572. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  5573. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  5574. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  5575. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  5576. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  5577. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  5578. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  5579. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  5580. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  5581. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  5582. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  5583. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  5584. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  5585. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  5586. * @arg @ref LL_AHB4_GRP1_PERIPH_HSEM (*)
  5587. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  5588. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  5589. *
  5590. * (*) value not defined in all devices.
  5591. * @retval None
  5592. */
  5593. __STATIC_INLINE void LL_C2_AHB4_GRP1_DisableClock(uint32_t Periphs)
  5594. {
  5595. CLEAR_BIT(RCC_C2->AHB4ENR, Periphs);
  5596. }
  5597. /**
  5598. * @brief Enable C2 AHB4 peripherals clock during Low Power (Sleep) mode.
  5599. * @rmtoll AHB4LPENR GPIOALPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5600. * AHB4LPENR GPIOBLPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5601. * AHB4LPENR GPIOCLPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5602. * AHB4LPENR GPIODLPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5603. * AHB4LPENR GPIOELPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5604. * AHB4LPENR GPIOFLPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5605. * AHB4LPENR GPIOGLPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5606. * AHB4LPENR GPIOHLPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5607. * AHB4LPENR GPIOILPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5608. * AHB4LPENR GPIOJLPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5609. * AHB4LPENR GPIOKLPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5610. * AHB4LPENR CRCLPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5611. * AHB4LPENR BDMALPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5612. * AHB4LPENR ADC3LPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5613. * AHB4LPENR BKPRAMLPEN LL_C2_AHB4_GRP1_EnableClockSleep\n
  5614. * AHB4LPENR SRAM4LPEN LL_C2_AHB4_GRP1_EnableClockSleep
  5615. * @param Periphs This parameter can be a combination of the following values:
  5616. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  5617. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  5618. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  5619. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  5620. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  5621. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  5622. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  5623. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  5624. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  5625. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  5626. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  5627. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  5628. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  5629. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  5630. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  5631. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  5632. * @retval None
  5633. */
  5634. __STATIC_INLINE void LL_C2_AHB4_GRP1_EnableClockSleep(uint32_t Periphs)
  5635. {
  5636. __IO uint32_t tmpreg;
  5637. SET_BIT(RCC_C2->AHB4LPENR, Periphs);
  5638. /* Delay after an RCC peripheral clock enabling */
  5639. tmpreg = READ_BIT(RCC_C2->AHB4LPENR, Periphs);
  5640. (void)tmpreg;
  5641. }
  5642. /**
  5643. * @brief Disable C2 AHB4 peripherals clock during Low Power (Sleep) mode.
  5644. * @rmtoll AHB4LPENR GPIOALPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5645. * AHB4LPENR GPIOBLPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5646. * AHB4LPENR GPIOCLPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5647. * AHB4LPENR GPIODLPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5648. * AHB4LPENR GPIOELPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5649. * AHB4LPENR GPIOFLPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5650. * AHB4LPENR GPIOGLPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5651. * AHB4LPENR GPIOHLPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5652. * AHB4LPENR GPIOILPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5653. * AHB4LPENR GPIOJLPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5654. * AHB4LPENR GPIOKLPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5655. * AHB4LPENR CRCLPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5656. * AHB4LPENR BDMALPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5657. * AHB4LPENR ADC3LPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5658. * AHB4LPENR BKPRAMLPEN LL_C2_AHB4_GRP1_DisableClockSleep\n
  5659. * AHB4LPENR SRAM4LPEN LL_C2_AHB4_GRP1_DisableClockSleep
  5660. * @param Periphs This parameter can be a combination of the following values:
  5661. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOA
  5662. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOB
  5663. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOC
  5664. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOD
  5665. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOE
  5666. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOF
  5667. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOG
  5668. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOH
  5669. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOI (*)
  5670. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOJ
  5671. * @arg @ref LL_AHB4_GRP1_PERIPH_GPIOK
  5672. * @arg @ref LL_AHB4_GRP1_PERIPH_CRC (*)
  5673. * @arg @ref LL_AHB4_GRP1_PERIPH_BDMA
  5674. * @arg @ref LL_AHB4_GRP1_PERIPH_ADC3 (*)
  5675. * @arg @ref LL_AHB4_GRP1_PERIPH_BKPRAM
  5676. * @arg @ref LL_AHB4_GRP1_PERIPH_SRAM4
  5677. * @retval None
  5678. */
  5679. __STATIC_INLINE void LL_C2_AHB4_GRP1_DisableClockSleep(uint32_t Periphs)
  5680. {
  5681. CLEAR_BIT(RCC_C2->AHB4LPENR, Periphs);
  5682. }
  5683. /**
  5684. * @}
  5685. */
  5686. /** @addtogroup BUS_LL_EF_APB3 APB3
  5687. * @{
  5688. */
  5689. /**
  5690. * @brief Enable C2 APB3 peripherals clock.
  5691. * @rmtoll APB3ENR LTDCEN LL_C2_APB3_GRP1_EnableClock\n
  5692. * APB3ENR DSIEN LL_C2_APB3_GRP1_EnableClock\n
  5693. * APB3ENR WWDG1EN LL_C2_APB3_GRP1_EnableClock
  5694. * @param Periphs This parameter can be a combination of the following values:
  5695. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  5696. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  5697. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  5698. *
  5699. * (*) value not defined in all devices.
  5700. * @retval None
  5701. */
  5702. __STATIC_INLINE void LL_C2_APB3_GRP1_EnableClock(uint32_t Periphs)
  5703. {
  5704. __IO uint32_t tmpreg;
  5705. SET_BIT(RCC_C2->APB3ENR, Periphs);
  5706. /* Delay after an RCC peripheral clock enabling */
  5707. tmpreg = READ_BIT(RCC_C2->APB3ENR, Periphs);
  5708. (void)tmpreg;
  5709. }
  5710. /**
  5711. * @brief Check if C2 APB3 peripheral clock is enabled or not
  5712. * @rmtoll APB3ENR LTDCEN LL_C2_APB3_GRP1_IsEnabledClock\n
  5713. * APB3ENR DSIEN LL_C2_APB3_GRP1_IsEnabledClock\n
  5714. * APB3ENR WWDG1EN LL_C2_APB3_GRP1_IsEnabledClock
  5715. * @param Periphs This parameter can be a combination of the following values:
  5716. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  5717. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  5718. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  5719. *
  5720. * (*) value not defined in all devices.
  5721. * @retval uint32_t
  5722. */
  5723. __STATIC_INLINE uint32_t LL_C2_APB3_GRP1_IsEnabledClock(uint32_t Periphs)
  5724. {
  5725. return ((READ_BIT(RCC_C2->APB3ENR, Periphs) == Periphs) ? 1U : 0U);
  5726. }
  5727. /**
  5728. * @brief Disable C2 APB3 peripherals clock.
  5729. * @rmtoll APB3ENR LTDCEN LL_C2_APB3_GRP1_DisableClock\n
  5730. * APB3ENR DSIEN LL_C2_APB3_GRP1_DisableClock\n
  5731. * APB3ENR WWDG1EN LL_C2_APB3_GRP1_DisableClock
  5732. * @param Periphs This parameter can be a combination of the following values:
  5733. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  5734. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  5735. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  5736. *
  5737. * (*) value not defined in all devices.
  5738. * @retval None
  5739. */
  5740. __STATIC_INLINE void LL_C2_APB3_GRP1_DisableClock(uint32_t Periphs)
  5741. {
  5742. CLEAR_BIT(RCC_C2->APB3ENR, Periphs);
  5743. }
  5744. /**
  5745. * @brief Enable C2 APB3 peripherals clock during Low Power (Sleep) mode.
  5746. * @rmtoll APB3LPENR LTDCLPEN LL_C2_APB3_GRP1_EnableClockSleep\n
  5747. * APB3LPENR DSILPEN LL_C2_APB3_GRP1_EnableClockSleep\n
  5748. * APB3LPENR WWDG1LPEN LL_C2_APB3_GRP1_EnableClockSleep
  5749. * @param Periphs This parameter can be a combination of the following values:
  5750. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  5751. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  5752. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  5753. *
  5754. * (*) value not defined in all devices.
  5755. * @retval None
  5756. */
  5757. __STATIC_INLINE void LL_C2_APB3_GRP1_EnableClockSleep(uint32_t Periphs)
  5758. {
  5759. __IO uint32_t tmpreg;
  5760. SET_BIT(RCC_C2->APB3LPENR, Periphs);
  5761. /* Delay after an RCC peripheral clock enabling */
  5762. tmpreg = READ_BIT(RCC_C2->APB3LPENR, Periphs);
  5763. (void)tmpreg;
  5764. }
  5765. /**
  5766. * @brief Disable C2 APB3 peripherals clock during Low Power (Sleep) mode.
  5767. * @rmtoll APB3LPENR LTDCLPEN LL_C2_APB3_GRP1_DisableClockSleep\n
  5768. * APB3LPENR DSILPEN LL_C2_APB3_GRP1_DisableClockSleep\n
  5769. * APB3LPENR WWDG1LPEN LL_C2_APB3_GRP1_DisableClockSleep
  5770. * @param Periphs This parameter can be a combination of the following values:
  5771. * @arg @ref LL_APB3_GRP1_PERIPH_LTDC (*)
  5772. * @arg @ref LL_APB3_GRP1_PERIPH_DSI (*)
  5773. * @arg @ref LL_APB3_GRP1_PERIPH_WWDG1
  5774. *
  5775. * (*) value not defined in all devices.
  5776. * @retval None
  5777. */
  5778. __STATIC_INLINE void LL_C2_APB3_GRP1_DisableClockSleep(uint32_t Periphs)
  5779. {
  5780. CLEAR_BIT(RCC_C2->APB3LPENR, Periphs);
  5781. }
  5782. /**
  5783. * @}
  5784. */
  5785. /** @addtogroup BUS_LL_EF_APB1 APB1
  5786. * @{
  5787. */
  5788. /**
  5789. * @brief Enable C2 APB1 peripherals clock.
  5790. * @rmtoll APB1LENR TIM2EN LL_C2_APB1_GRP1_EnableClock\n
  5791. * APB1LENR TIM3EN LL_C2_APB1_GRP1_EnableClock\n
  5792. * APB1LENR TIM4EN LL_C2_APB1_GRP1_EnableClock\n
  5793. * APB1LENR TIM5EN LL_C2_APB1_GRP1_EnableClock\n
  5794. * APB1LENR TIM6EN LL_C2_APB1_GRP1_EnableClock\n
  5795. * APB1LENR TIM7EN LL_C2_APB1_GRP1_EnableClock\n
  5796. * APB1LENR TIM12EN LL_C2_APB1_GRP1_EnableClock\n
  5797. * APB1LENR TIM13EN LL_C2_APB1_GRP1_EnableClock\n
  5798. * APB1LENR TIM14EN LL_C2_APB1_GRP1_EnableClock\n
  5799. * APB1LENR LPTIM1EN LL_C2_APB1_GRP1_EnableClock\n
  5800. * APB1LENR WWDG2EN LL_C2_APB1_GRP1_EnableClock\n
  5801. * APB1LENR SPI2EN LL_C2_APB1_GRP1_EnableClock\n
  5802. * APB1LENR SPI3EN LL_C2_APB1_GRP1_EnableClock\n
  5803. * APB1LENR SPDIFRXEN LL_C2_APB1_GRP1_EnableClock\n
  5804. * APB1LENR USART2EN LL_C2_APB1_GRP1_EnableClock\n
  5805. * APB1LENR USART3EN LL_C2_APB1_GRP1_EnableClock\n
  5806. * APB1LENR UART4EN LL_C2_APB1_GRP1_EnableClock\n
  5807. * APB1LENR UART5EN LL_C2_APB1_GRP1_EnableClock\n
  5808. * APB1LENR I2C1EN LL_C2_APB1_GRP1_EnableClock\n
  5809. * APB1LENR I2C2EN LL_C2_APB1_GRP1_EnableClock\n
  5810. * APB1LENR I2C3EN LL_C2_APB1_GRP1_EnableClock\n
  5811. * APB1LENR CECEN LL_C2_APB1_GRP1_EnableClock\n
  5812. * APB1LENR DAC12EN LL_C2_APB1_GRP1_EnableClock\n
  5813. * APB1LENR UART7EN LL_C2_APB1_GRP1_EnableClock\n
  5814. * APB1LENR UART8EN LL_C2_APB1_GRP1_EnableClock
  5815. * @param Periphs This parameter can be a combination of the following values:
  5816. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  5817. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  5818. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  5819. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  5820. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  5821. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  5822. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  5823. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  5824. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  5825. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  5826. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  5827. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  5828. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  5829. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  5830. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  5831. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  5832. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  5833. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  5834. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  5835. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  5836. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  5837. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  5838. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  5839. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  5840. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  5841. *
  5842. * (*) value not defined in all devices.
  5843. * @retval None
  5844. */
  5845. __STATIC_INLINE void LL_C2_APB1_GRP1_EnableClock(uint32_t Periphs)
  5846. {
  5847. __IO uint32_t tmpreg;
  5848. SET_BIT(RCC_C2->APB1LENR, Periphs);
  5849. /* Delay after an RCC peripheral clock enabling */
  5850. tmpreg = READ_BIT(RCC_C2->APB1LENR, Periphs);
  5851. (void)tmpreg;
  5852. }
  5853. /**
  5854. * @brief Check if C2 APB1 peripheral clock is enabled or not
  5855. * @rmtoll APB1LENR TIM2EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5856. * APB1LENR TIM3EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5857. * APB1LENR TIM4EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5858. * APB1LENR TIM5EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5859. * APB1LENR TIM6EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5860. * APB1LENR TIM7EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5861. * APB1LENR TIM12EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5862. * APB1LENR TIM13EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5863. * APB1LENR TIM14EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5864. * APB1LENR LPTIM1EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5865. * APB1LENR WWDG2EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5866. * APB1LENR SPI2EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5867. * APB1LENR SPI3EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5868. * APB1LENR SPDIFRXEN LL_C2_APB1_GRP1_IsEnabledClock\n
  5869. * APB1LENR USART2EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5870. * APB1LENR USART3EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5871. * APB1LENR UART4EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5872. * APB1LENR UART5EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5873. * APB1LENR I2C1EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5874. * APB1LENR I2C2EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5875. * APB1LENR I2C3EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5876. * APB1LENR CECEN LL_C2_APB1_GRP1_IsEnabledClock\n
  5877. * APB1LENR DAC12EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5878. * APB1LENR UART7EN LL_C2_APB1_GRP1_IsEnabledClock\n
  5879. * APB1LENR UART8EN LL_C2_APB1_GRP1_IsEnabledClock
  5880. * @param Periphs This parameter can be a combination of the following values:
  5881. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  5882. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  5883. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  5884. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  5885. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  5886. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  5887. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  5888. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  5889. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  5890. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  5891. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  5892. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  5893. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  5894. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  5895. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  5896. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  5897. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  5898. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  5899. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  5900. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  5901. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  5902. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  5903. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  5904. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  5905. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  5906. *
  5907. * (*) value not defined in all devices.
  5908. * @retval uint32_t
  5909. */
  5910. __STATIC_INLINE uint32_t LL_C2_APB1_GRP1_IsEnabledClock(uint32_t Periphs)
  5911. {
  5912. return ((READ_BIT(RCC_C2->APB1LENR, Periphs) == Periphs) ? 1U : 0U);
  5913. }
  5914. /**
  5915. * @brief Disable C2 APB1 peripherals clock.
  5916. * @rmtoll APB1LENR TIM2EN LL_C2_APB1_GRP1_DisableClock\n
  5917. * APB1LENR TIM3EN LL_C2_APB1_GRP1_DisableClock\n
  5918. * APB1LENR TIM4EN LL_C2_APB1_GRP1_DisableClock\n
  5919. * APB1LENR TIM5EN LL_C2_APB1_GRP1_DisableClock\n
  5920. * APB1LENR TIM6EN LL_C2_APB1_GRP1_DisableClock\n
  5921. * APB1LENR TIM7EN LL_C2_APB1_GRP1_DisableClock\n
  5922. * APB1LENR TIM12EN LL_C2_APB1_GRP1_DisableClock\n
  5923. * APB1LENR TIM13EN LL_C2_APB1_GRP1_DisableClock\n
  5924. * APB1LENR TIM14EN LL_C2_APB1_GRP1_DisableClock\n
  5925. * APB1LENR LPTIM1EN LL_C2_APB1_GRP1_DisableClock\n
  5926. * APB1LENR WWDG2EN LL_C2_APB1_GRP1_DisableClock\n
  5927. * APB1LENR SPI2EN LL_C2_APB1_GRP1_DisableClock\n
  5928. * APB1LENR SPI3EN LL_C2_APB1_GRP1_DisableClock\n
  5929. * APB1LENR SPDIFRXEN LL_C2_APB1_GRP1_DisableClock\n
  5930. * APB1LENR USART2EN LL_C2_APB1_GRP1_DisableClock\n
  5931. * APB1LENR USART3EN LL_C2_APB1_GRP1_DisableClock\n
  5932. * APB1LENR UART4EN LL_C2_APB1_GRP1_DisableClock\n
  5933. * APB1LENR UART5EN LL_C2_APB1_GRP1_DisableClock\n
  5934. * APB1LENR I2C1EN LL_C2_APB1_GRP1_DisableClock\n
  5935. * APB1LENR I2C2EN LL_C2_APB1_GRP1_DisableClock\n
  5936. * APB1LENR I2C3EN LL_C2_APB1_GRP1_DisableClock\n
  5937. * APB1LENR CECEN LL_C2_APB1_GRP1_DisableClock\n
  5938. * APB1LENR DAC12EN LL_C2_APB1_GRP1_DisableClock\n
  5939. * APB1LENR UART7EN LL_C2_APB1_GRP1_DisableClock\n
  5940. * APB1LENR UART8EN LL_C2_APB1_GRP1_DisableClock
  5941. * @param Periphs This parameter can be a combination of the following values:
  5942. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  5943. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  5944. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  5945. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  5946. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  5947. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  5948. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  5949. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  5950. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  5951. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  5952. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  5953. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  5954. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  5955. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  5956. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  5957. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  5958. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  5959. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  5960. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  5961. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  5962. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  5963. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  5964. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  5965. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  5966. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  5967. *
  5968. * (*) value not defined in all devices.
  5969. * @retval None
  5970. */
  5971. __STATIC_INLINE void LL_C2_APB1_GRP1_DisableClock(uint32_t Periphs)
  5972. {
  5973. CLEAR_BIT(RCC_C2->APB1LENR, Periphs);
  5974. }
  5975. /**
  5976. * @brief Enable C2 APB1 peripherals clock during Low Power (Sleep) mode.
  5977. * @rmtoll APB1LLPENR TIM2LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5978. * APB1LLPENR TIM3LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5979. * APB1LLPENR TIM4LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5980. * APB1LLPENR TIM5LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5981. * APB1LLPENR TIM6LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5982. * APB1LLPENR TIM7LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5983. * APB1LLPENR TIM12LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5984. * APB1LLPENR TIM13LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5985. * APB1LLPENR TIM14LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5986. * APB1LLPENR LPTIM1LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5987. * APB1LLPENR WWDG2LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5988. * APB1LLPENR SPI2LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5989. * APB1LLPENR SPI3LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5990. * APB1LLPENR SPDIFRXLPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5991. * APB1LLPENR USART2LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5992. * APB1LLPENR USART3LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5993. * APB1LLPENR UART4LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5994. * APB1LLPENR UART5LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5995. * APB1LLPENR I2C1LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5996. * APB1LLPENR I2C2LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5997. * APB1LLPENR I2C3LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5998. * APB1LLPENR CECLPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  5999. * APB1LLPENR DAC12LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  6000. * APB1LLPENR UART7LPEN LL_C2_APB1_GRP1_EnableClockSleep\n
  6001. * APB1LLPENR UART8LPEN LL_C2_APB1_GRP1_EnableClockSleep
  6002. * @param Periphs This parameter can be a combination of the following values:
  6003. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  6004. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  6005. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  6006. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  6007. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  6008. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  6009. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  6010. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  6011. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  6012. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  6013. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  6014. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  6015. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  6016. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  6017. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  6018. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  6019. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  6020. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  6021. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  6022. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  6023. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  6024. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  6025. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  6026. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  6027. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  6028. *
  6029. * (*) value not defined in all devices.
  6030. * @retval None
  6031. */
  6032. __STATIC_INLINE void LL_C2_APB1_GRP1_EnableClockSleep(uint32_t Periphs)
  6033. {
  6034. __IO uint32_t tmpreg;
  6035. SET_BIT(RCC_C2->APB1LLPENR, Periphs);
  6036. /* Delay after an RCC peripheral clock enabling */
  6037. tmpreg = READ_BIT(RCC_C2->APB1LLPENR, Periphs);
  6038. (void)tmpreg;
  6039. }
  6040. /**
  6041. * @brief Disable C2 APB1 peripherals clock during Low Power (Sleep) mode.
  6042. * @rmtoll APB1LLPENR TIM2LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6043. * APB1LLPENR TIM3LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6044. * APB1LLPENR TIM4LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6045. * APB1LLPENR TIM5LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6046. * APB1LLPENR TIM6LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6047. * APB1LLPENR TIM7LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6048. * APB1LLPENR TIM12LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6049. * APB1LLPENR TIM13LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6050. * APB1LLPENR TIM14LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6051. * APB1LLPENR LPTIM1LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6052. * APB1LLPENR WWDG2LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6053. * APB1LLPENR SPI2LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6054. * APB1LLPENR SPI3LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6055. * APB1LLPENR SPDIFRXLPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6056. * APB1LLPENR USART2LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6057. * APB1LLPENR USART3LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6058. * APB1LLPENR UART4LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6059. * APB1LLPENR UART5LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6060. * APB1LLPENR I2C1LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6061. * APB1LLPENR I2C2LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6062. * APB1LLPENR I2C3LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6063. * APB1LLPENR CECLPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6064. * APB1LLPENR DAC12LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6065. * APB1LLPENR UART7LPEN LL_C2_APB1_GRP1_DisableClockSleep\n
  6066. * APB1LLPENR UART8LPEN LL_C2_APB1_GRP1_DisableClockSleep
  6067. * @param Periphs This parameter can be a combination of the following values:
  6068. * @arg @ref LL_APB1_GRP1_PERIPH_TIM2
  6069. * @arg @ref LL_APB1_GRP1_PERIPH_TIM3
  6070. * @arg @ref LL_APB1_GRP1_PERIPH_TIM4
  6071. * @arg @ref LL_APB1_GRP1_PERIPH_TIM5
  6072. * @arg @ref LL_APB1_GRP1_PERIPH_TIM6
  6073. * @arg @ref LL_APB1_GRP1_PERIPH_TIM7
  6074. * @arg @ref LL_APB1_GRP1_PERIPH_TIM12
  6075. * @arg @ref LL_APB1_GRP1_PERIPH_TIM13
  6076. * @arg @ref LL_APB1_GRP1_PERIPH_TIM14
  6077. * @arg @ref LL_APB1_GRP1_PERIPH_LPTIM1
  6078. * @arg @ref LL_APB1_GRP1_PERIPH_WWDG2 (*)
  6079. * @arg @ref LL_APB1_GRP1_PERIPH_SPI2
  6080. * @arg @ref LL_APB1_GRP1_PERIPH_SPI3
  6081. * @arg @ref LL_APB1_GRP1_PERIPH_SPDIFRX
  6082. * @arg @ref LL_APB1_GRP1_PERIPH_USART2
  6083. * @arg @ref LL_APB1_GRP1_PERIPH_USART3
  6084. * @arg @ref LL_APB1_GRP1_PERIPH_UART4
  6085. * @arg @ref LL_APB1_GRP1_PERIPH_UART5
  6086. * @arg @ref LL_APB1_GRP1_PERIPH_I2C1
  6087. * @arg @ref LL_APB1_GRP1_PERIPH_I2C2
  6088. * @arg @ref LL_APB1_GRP1_PERIPH_I2C3
  6089. * @arg @ref LL_APB1_GRP1_PERIPH_CEC
  6090. * @arg @ref LL_APB1_GRP1_PERIPH_DAC12
  6091. * @arg @ref LL_APB1_GRP1_PERIPH_UART7
  6092. * @arg @ref LL_APB1_GRP1_PERIPH_UART8
  6093. *
  6094. * (*) value not defined in all devices.
  6095. * @retval None
  6096. */
  6097. __STATIC_INLINE void LL_C2_APB1_GRP1_DisableClockSleep(uint32_t Periphs)
  6098. {
  6099. CLEAR_BIT(RCC_C2->APB1LLPENR, Periphs);
  6100. }
  6101. /**
  6102. * @brief Enable C2 APB1 peripherals clock.
  6103. * @rmtoll APB1HENR CRSEN LL_C2_APB1_GRP2_EnableClock\n
  6104. * APB1HENR SWPMIEN LL_C2_APB1_GRP2_EnableClock\n
  6105. * APB1HENR OPAMPEN LL_C2_APB1_GRP2_EnableClock\n
  6106. * APB1HENR MDIOSEN LL_C2_APB1_GRP2_EnableClock\n
  6107. * APB1HENR FDCANEN LL_C2_APB1_GRP2_EnableClock
  6108. * @param Periphs This parameter can be a combination of the following values:
  6109. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  6110. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  6111. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  6112. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  6113. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  6114. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  6115. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  6116. *
  6117. * (*) value not defined in all devices.
  6118. * @retval None
  6119. */
  6120. __STATIC_INLINE void LL_C2_APB1_GRP2_EnableClock(uint32_t Periphs)
  6121. {
  6122. __IO uint32_t tmpreg;
  6123. SET_BIT(RCC_C2->APB1HENR, Periphs);
  6124. /* Delay after an RCC peripheral clock enabling */
  6125. tmpreg = READ_BIT(RCC_C2->APB1HENR, Periphs);
  6126. (void)tmpreg;
  6127. }
  6128. /**
  6129. * @brief Check if C2 APB1 peripheral clock is enabled or not
  6130. * @rmtoll APB1HENR CRSEN LL_C2_APB1_GRP2_IsEnabledClock\n
  6131. * APB1HENR SWPMIEN LL_C2_APB1_GRP2_IsEnabledClock\n
  6132. * APB1HENR OPAMPEN LL_C2_APB1_GRP2_IsEnabledClock\n
  6133. * APB1HENR MDIOSEN LL_C2_APB1_GRP2_IsEnabledClock\n
  6134. * APB1HENR FDCANEN LL_C2_APB1_GRP2_IsEnabledClock
  6135. * @param Periphs This parameter can be a combination of the following values:
  6136. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  6137. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  6138. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  6139. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  6140. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  6141. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  6142. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  6143. *
  6144. * (*) value not defined in all devices.
  6145. * @retval uint32_t
  6146. */
  6147. __STATIC_INLINE uint32_t LL_C2_APB1_GRP2_IsEnabledClock(uint32_t Periphs)
  6148. {
  6149. return ((READ_BIT(RCC_C2->APB1HENR, Periphs) == Periphs) ? 1U : 0U);
  6150. }
  6151. /**
  6152. * @brief Disable C2 APB1 peripherals clock.
  6153. * @rmtoll APB1HENR CRSEN LL_C2_APB1_GRP2_DisableClock\n
  6154. * APB1HENR SWPMIEN LL_C2_APB1_GRP2_DisableClock\n
  6155. * APB1HENR OPAMPEN LL_C2_APB1_GRP2_DisableClock\n
  6156. * APB1HENR MDIOSEN LL_C2_APB1_GRP2_DisableClock\n
  6157. * APB1HENR FDCANEN LL_C2_APB1_GRP2_DisableClock
  6158. * @param Periphs This parameter can be a combination of the following values:
  6159. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  6160. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  6161. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  6162. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  6163. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  6164. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  6165. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  6166. *
  6167. * (*) value not defined in all devices.
  6168. * @retval None
  6169. */
  6170. __STATIC_INLINE void LL_C2_APB1_GRP2_DisableClock(uint32_t Periphs)
  6171. {
  6172. CLEAR_BIT(RCC_C2->APB1HENR, Periphs);
  6173. }
  6174. /**
  6175. * @brief Enable C2 APB1 peripherals clock during Low Power (Sleep) mode.
  6176. * @rmtoll APB1HLPENR CRSLPEN LL_C2_APB1_GRP2_EnableClockSleep\n
  6177. * APB1HLPENR SWPMILPEN LL_C2_APB1_GRP2_EnableClockSleep\n
  6178. * APB1HLPENR OPAMPLPEN LL_C2_APB1_GRP2_EnableClockSleep\n
  6179. * APB1HLPENR MDIOSLPEN LL_C2_APB1_GRP2_EnableClockSleep\n
  6180. * APB1HLPENR FDCANLPEN LL_C2_APB1_GRP2_EnableClockSleep
  6181. * @param Periphs This parameter can be a combination of the following values:
  6182. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  6183. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  6184. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  6185. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  6186. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  6187. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  6188. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  6189. *
  6190. * (*) value not defined in all devices.
  6191. * @retval None
  6192. */
  6193. __STATIC_INLINE void LL_C2_APB1_GRP2_EnableClockSleep(uint32_t Periphs)
  6194. {
  6195. __IO uint32_t tmpreg;
  6196. SET_BIT(RCC_C2->APB1HLPENR, Periphs);
  6197. /* Delay after an RCC peripheral clock enabling */
  6198. tmpreg = READ_BIT(RCC_C2->APB1HLPENR, Periphs);
  6199. (void)tmpreg;
  6200. }
  6201. /**
  6202. * @brief Disable C2 APB1 peripherals clock during Low Power (Sleep) mode.
  6203. * @rmtoll APB1HLPENR CRSLPEN LL_C2_APB1_GRP2_DisableClockSleep\n
  6204. * APB1HLPENR SWPMILPEN LL_C2_APB1_GRP2_DisableClockSleep\n
  6205. * APB1HLPENR OPAMPLPEN LL_C2_APB1_GRP2_DisableClockSleep\n
  6206. * APB1HLPENR MDIOSLPEN LL_C2_APB1_GRP2_DisableClockSleep\n
  6207. * APB1HLPENR FDCANLPEN LL_C2_APB1_GRP2_DisableClockSleep
  6208. * @param Periphs This parameter can be a combination of the following values:
  6209. * @arg @ref LL_APB1_GRP2_PERIPH_CRS
  6210. * @arg @ref LL_APB1_GRP2_PERIPH_SWPMI1
  6211. * @arg @ref LL_APB1_GRP2_PERIPH_OPAMP
  6212. * @arg @ref LL_APB1_GRP2_PERIPH_MDIOS
  6213. * @arg @ref LL_APB1_GRP2_PERIPH_FDCAN
  6214. * @arg @ref LL_APB1_GRP2_PERIPH_TIM23 (*)
  6215. * @arg @ref LL_APB1_GRP2_PERIPH_TIM24 (*)
  6216. *
  6217. * (*) value not defined in all devices.
  6218. * @retval None
  6219. */
  6220. __STATIC_INLINE void LL_C2_APB1_GRP2_DisableClockSleep(uint32_t Periphs)
  6221. {
  6222. CLEAR_BIT(RCC_C2->APB1HLPENR, Periphs);
  6223. }
  6224. /**
  6225. * @}
  6226. */
  6227. /** @addtogroup BUS_LL_EF_APB2 APB2
  6228. * @{
  6229. */
  6230. /**
  6231. * @brief Enable C2 APB2 peripherals clock.
  6232. * @rmtoll APB2ENR TIM1EN LL_C2_APB2_GRP1_EnableClock\n
  6233. * APB2ENR TIM8EN LL_C2_APB2_GRP1_EnableClock\n
  6234. * APB2ENR USART1EN LL_C2_APB2_GRP1_EnableClock\n
  6235. * APB2ENR USART6EN LL_C2_APB2_GRP1_EnableClock\n
  6236. * APB2ENR SPI1EN LL_C2_APB2_GRP1_EnableClock\n
  6237. * APB2ENR SPI4EN LL_C2_APB2_GRP1_EnableClock\n
  6238. * APB2ENR TIM15EN LL_C2_APB2_GRP1_EnableClock\n
  6239. * APB2ENR TIM16EN LL_C2_APB2_GRP1_EnableClock\n
  6240. * APB2ENR TIM17EN LL_C2_APB2_GRP1_EnableClock\n
  6241. * APB2ENR SPI5EN LL_C2_APB2_GRP1_EnableClock\n
  6242. * APB2ENR SAI1EN LL_C2_APB2_GRP1_EnableClock\n
  6243. * APB2ENR SAI2EN LL_C2_APB2_GRP1_EnableClock\n
  6244. * APB2ENR SAI3EN LL_C2_APB2_GRP1_EnableClock\n
  6245. * APB2ENR DFSDM1EN LL_C2_APB2_GRP1_EnableClock\n
  6246. * APB2ENR HRTIMEN LL_C2_APB2_GRP1_EnableClock
  6247. * @param Periphs This parameter can be a combination of the following values:
  6248. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  6249. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  6250. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  6251. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  6252. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  6253. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  6254. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  6255. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  6256. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  6257. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  6258. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  6259. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  6260. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  6261. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  6262. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  6263. *
  6264. * (*) value not defined in all devices.
  6265. * @retval None
  6266. */
  6267. __STATIC_INLINE void LL_C2_APB2_GRP1_EnableClock(uint32_t Periphs)
  6268. {
  6269. __IO uint32_t tmpreg;
  6270. SET_BIT(RCC_C2->APB2ENR, Periphs);
  6271. /* Delay after an RCC peripheral clock enabling */
  6272. tmpreg = READ_BIT(RCC_C2->APB2ENR, Periphs);
  6273. (void)tmpreg;
  6274. }
  6275. /**
  6276. * @brief Check if C2 APB2 peripheral clock is enabled or not
  6277. * @rmtoll APB2ENR TIM1EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6278. * APB2ENR TIM8EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6279. * APB2ENR USART1EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6280. * APB2ENR USART6EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6281. * APB2ENR SPI1EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6282. * APB2ENR SPI4EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6283. * APB2ENR TIM15EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6284. * APB2ENR TIM16EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6285. * APB2ENR TIM17EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6286. * APB2ENR SPI5EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6287. * APB2ENR SAI1EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6288. * APB2ENR SAI2EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6289. * APB2ENR SAI3EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6290. * APB2ENR DFSDM1EN LL_C2_APB2_GRP1_IsEnabledClock\n
  6291. * APB2ENR HRTIMEN LL_C2_APB2_GRP1_IsEnabledClock
  6292. * @param Periphs This parameter can be a combination of the following values:
  6293. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  6294. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  6295. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  6296. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  6297. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  6298. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  6299. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  6300. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  6301. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  6302. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  6303. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  6304. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  6305. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  6306. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  6307. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  6308. *
  6309. * (*) value not defined in all devices.
  6310. * @retval uint32_t
  6311. */
  6312. __STATIC_INLINE uint32_t LL_C2_APB2_GRP1_IsEnabledClock(uint32_t Periphs)
  6313. {
  6314. return ((READ_BIT(RCC_C2->APB2ENR, Periphs) == Periphs) ? 1U : 0U);
  6315. }
  6316. /**
  6317. * @brief Disable C2 APB2 peripherals clock.
  6318. * @rmtoll APB2ENR TIM1EN LL_C2_APB2_GRP1_DisableClock\n
  6319. * APB2ENR TIM8EN LL_C2_APB2_GRP1_DisableClock\n
  6320. * APB2ENR USART1EN LL_C2_APB2_GRP1_DisableClock\n
  6321. * APB2ENR USART6EN LL_C2_APB2_GRP1_DisableClock\n
  6322. * APB2ENR SPI1EN LL_C2_APB2_GRP1_DisableClock\n
  6323. * APB2ENR SPI4EN LL_C2_APB2_GRP1_DisableClock\n
  6324. * APB2ENR TIM15EN LL_C2_APB2_GRP1_DisableClock\n
  6325. * APB2ENR TIM16EN LL_C2_APB2_GRP1_DisableClock\n
  6326. * APB2ENR TIM17EN LL_C2_APB2_GRP1_DisableClock\n
  6327. * APB2ENR SPI5EN LL_C2_APB2_GRP1_DisableClock\n
  6328. * APB2ENR SAI1EN LL_C2_APB2_GRP1_DisableClock\n
  6329. * APB2ENR SAI2EN LL_C2_APB2_GRP1_DisableClock\n
  6330. * APB2ENR SAI3EN LL_C2_APB2_GRP1_DisableClock\n
  6331. * APB2ENR DFSDM1EN LL_C2_APB2_GRP1_DisableClock\n
  6332. * APB2ENR HRTIMEN LL_C2_APB2_GRP1_DisableClock
  6333. * @param Periphs This parameter can be a combination of the following values:
  6334. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  6335. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  6336. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  6337. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  6338. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  6339. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  6340. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  6341. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  6342. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  6343. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  6344. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  6345. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  6346. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  6347. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  6348. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  6349. *
  6350. * (*) value not defined in all devices.
  6351. * @retval None
  6352. */
  6353. __STATIC_INLINE void LL_C2_APB2_GRP1_DisableClock(uint32_t Periphs)
  6354. {
  6355. CLEAR_BIT(RCC_C2->APB2ENR, Periphs);
  6356. }
  6357. /**
  6358. * @brief Enable C2 APB2 peripherals clock during Low Power (Sleep) mode.
  6359. * @rmtoll APB2LPENR TIM1LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6360. * APB2LPENR TIM8LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6361. * APB2LPENR USART1LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6362. * APB2LPENR USART6LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6363. * APB2LPENR SPI1LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6364. * APB2LPENR SPI4LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6365. * APB2LPENR TIM15LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6366. * APB2LPENR TIM16LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6367. * APB2LPENR TIM17LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6368. * APB2LPENR SPI5LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6369. * APB2LPENR SAI1LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6370. * APB2LPENR SAI2LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6371. * APB2LPENR SAI3LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6372. * APB2LPENR DFSDM1LPEN LL_C2_APB2_GRP1_EnableClockSleep\n
  6373. * APB2LPENR HRTIMLPEN LL_C2_APB2_GRP1_EnableClockSleep
  6374. * @param Periphs This parameter can be a combination of the following values:
  6375. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  6376. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  6377. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  6378. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  6379. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  6380. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  6381. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  6382. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  6383. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  6384. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  6385. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  6386. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  6387. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  6388. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  6389. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  6390. *
  6391. * (*) value not defined in all devices.
  6392. * @retval None
  6393. */
  6394. __STATIC_INLINE void LL_C2_APB2_GRP1_EnableClockSleep(uint32_t Periphs)
  6395. {
  6396. __IO uint32_t tmpreg;
  6397. SET_BIT(RCC_C2->APB2LPENR, Periphs);
  6398. /* Delay after an RCC peripheral clock enabling */
  6399. tmpreg = READ_BIT(RCC_C2->APB2LPENR, Periphs);
  6400. (void)tmpreg;
  6401. }
  6402. /**
  6403. * @brief Disable C2 APB2 peripherals clock during Low Power (Sleep) mode.
  6404. * @rmtoll APB2LPENR TIM1LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6405. * APB2LPENR TIM8LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6406. * APB2LPENR USART1LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6407. * APB2LPENR USART6LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6408. * APB2LPENR SPI1LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6409. * APB2LPENR SPI4LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6410. * APB2LPENR TIM15LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6411. * APB2LPENR TIM16LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6412. * APB2LPENR TIM17LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6413. * APB2LPENR SPI5LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6414. * APB2LPENR SAI1LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6415. * APB2LPENR SAI2LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6416. * APB2LPENR SAI3LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6417. * APB2LPENR DFSDM1LPEN LL_C2_APB2_GRP1_DisableClockSleep\n
  6418. * APB2LPENR HRTIMLPEN LL_C2_APB2_GRP1_DisableClockSleep
  6419. * @param Periphs This parameter can be a combination of the following values:
  6420. * @arg @ref LL_APB2_GRP1_PERIPH_TIM1
  6421. * @arg @ref LL_APB2_GRP1_PERIPH_TIM8
  6422. * @arg @ref LL_APB2_GRP1_PERIPH_USART1
  6423. * @arg @ref LL_APB2_GRP1_PERIPH_USART6
  6424. * @arg @ref LL_APB2_GRP1_PERIPH_SPI1
  6425. * @arg @ref LL_APB2_GRP1_PERIPH_SPI4
  6426. * @arg @ref LL_APB2_GRP1_PERIPH_TIM15
  6427. * @arg @ref LL_APB2_GRP1_PERIPH_TIM16
  6428. * @arg @ref LL_APB2_GRP1_PERIPH_TIM17
  6429. * @arg @ref LL_APB2_GRP1_PERIPH_SPI5
  6430. * @arg @ref LL_APB2_GRP1_PERIPH_SAI1
  6431. * @arg @ref LL_APB2_GRP1_PERIPH_SAI2 (*)
  6432. * @arg @ref LL_APB2_GRP1_PERIPH_SAI3 (*)
  6433. * @arg @ref LL_APB2_GRP1_PERIPH_DFSDM1
  6434. * @arg @ref LL_APB2_GRP1_PERIPH_HRTIM (*)
  6435. *
  6436. * (*) value not defined in all devices.
  6437. * @retval None
  6438. */
  6439. __STATIC_INLINE void LL_C2_APB2_GRP1_DisableClockSleep(uint32_t Periphs)
  6440. {
  6441. CLEAR_BIT(RCC_C2->APB2LPENR, Periphs);
  6442. }
  6443. /**
  6444. * @}
  6445. */
  6446. /** @addtogroup BUS_LL_EF_APB4 APB4
  6447. * @{
  6448. */
  6449. /**
  6450. * @brief Enable C2 APB4 peripherals clock.
  6451. * @rmtoll APB4ENR SYSCFGEN LL_C2_APB4_GRP1_EnableClock\n
  6452. * APB4ENR LPUART1EN LL_C2_APB4_GRP1_EnableClock\n
  6453. * APB4ENR SPI6EN LL_C2_APB4_GRP1_EnableClock\n
  6454. * APB4ENR I2C4EN LL_C2_APB4_GRP1_EnableClock\n
  6455. * APB4ENR LPTIM2EN LL_C2_APB4_GRP1_EnableClock\n
  6456. * APB4ENR LPTIM3EN LL_C2_APB4_GRP1_EnableClock\n
  6457. * APB4ENR LPTIM4EN LL_C2_APB4_GRP1_EnableClock\n
  6458. * APB4ENR LPTIM5EN LL_C2_APB4_GRP1_EnableClock\n
  6459. * APB4ENR COMP12EN LL_C2_APB4_GRP1_EnableClock\n
  6460. * APB4ENR VREFEN LL_C2_APB4_GRP1_EnableClock\n
  6461. * APB4ENR RTCAPBEN LL_C2_APB4_GRP1_EnableClock\n
  6462. * APB4ENR SAI4EN LL_C2_APB4_GRP1_EnableClock
  6463. * @param Periphs This parameter can be a combination of the following values:
  6464. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  6465. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  6466. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  6467. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  6468. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  6469. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  6470. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  6471. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  6472. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  6473. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  6474. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  6475. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  6476. *
  6477. * (*) value not defined in all devices
  6478. * @retval None
  6479. */
  6480. __STATIC_INLINE void LL_C2_APB4_GRP1_EnableClock(uint32_t Periphs)
  6481. {
  6482. __IO uint32_t tmpreg;
  6483. SET_BIT(RCC_C2->APB4ENR, Periphs);
  6484. /* Delay after an RCC peripheral clock enabling */
  6485. tmpreg = READ_BIT(RCC_C2->APB4ENR, Periphs);
  6486. (void)tmpreg;
  6487. }
  6488. /**
  6489. * @brief Check if C2 APB4 peripheral clock is enabled or not
  6490. * @rmtoll APB4ENR SYSCFGEN LL_C2_APB4_GRP1_IsEnabledClock\n
  6491. * APB4ENR LPUART1EN LL_C2_APB4_GRP1_IsEnabledClock\n
  6492. * APB4ENR SPI6EN LL_C2_APB4_GRP1_IsEnabledClock\n
  6493. * APB4ENR I2C4EN LL_C2_APB4_GRP1_IsEnabledClock\n
  6494. * APB4ENR LPTIM2EN LL_C2_APB4_GRP1_IsEnabledClock\n
  6495. * APB4ENR LPTIM3EN LL_C2_APB4_GRP1_IsEnabledClock\n
  6496. * APB4ENR LPTIM4EN LL_C2_APB4_GRP1_IsEnabledClock\n
  6497. * APB4ENR LPTIM5EN LL_C2_APB4_GRP1_IsEnabledClock\n
  6498. * APB4ENR COMP12EN LL_C2_APB4_GRP1_IsEnabledClock\n
  6499. * APB4ENR VREFEN LL_C2_APB4_GRP1_IsEnabledClock\n
  6500. * APB4ENR RTCAPBEN LL_C2_APB4_GRP1_IsEnabledClock\n
  6501. * APB4ENR SAI4EN LL_C2_APB4_GRP1_IsEnabledClock
  6502. * @param Periphs This parameter can be a combination of the following values:
  6503. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  6504. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  6505. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  6506. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  6507. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  6508. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  6509. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  6510. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  6511. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  6512. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  6513. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  6514. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  6515. *
  6516. * (*) value not defined in all devices
  6517. * @retval uint32_t
  6518. */
  6519. __STATIC_INLINE uint32_t LL_C2_APB4_GRP1_IsEnabledClock(uint32_t Periphs)
  6520. {
  6521. return ((READ_BIT(RCC_C2->APB4ENR, Periphs) == Periphs) ? 1U : 0U);
  6522. }
  6523. /**
  6524. * @brief Disable C2 APB4 peripherals clock.
  6525. * @rmtoll APB4ENR SYSCFGEN LL_C2_APB4_GRP1_DisableClock\n
  6526. * APB4ENR LPUART1EN LL_C2_APB4_GRP1_DisableClock\n
  6527. * APB4ENR SPI6EN LL_C2_APB4_GRP1_DisableClock\n
  6528. * APB4ENR I2C4EN LL_C2_APB4_GRP1_DisableClock\n
  6529. * APB4ENR LPTIM2EN LL_C2_APB4_GRP1_DisableClock\n
  6530. * APB4ENR LPTIM3EN LL_C2_APB4_GRP1_DisableClock\n
  6531. * APB4ENR LPTIM4EN LL_C2_APB4_GRP1_DisableClock\n
  6532. * APB4ENR LPTIM5EN LL_C2_APB4_GRP1_DisableClock\n
  6533. * APB4ENR COMP12EN LL_C2_APB4_GRP1_DisableClock\n
  6534. * APB4ENR VREFEN LL_C2_APB4_GRP1_DisableClock\n
  6535. * APB4ENR RTCAPBEN LL_C2_APB4_GRP1_DisableClock\n
  6536. * APB4ENR SAI4EN LL_C2_APB4_GRP1_DisableClock
  6537. * @param Periphs This parameter can be a combination of the following values:
  6538. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  6539. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  6540. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  6541. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  6542. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  6543. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  6544. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  6545. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  6546. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  6547. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  6548. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  6549. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  6550. *
  6551. * (*) value not defined in all devices
  6552. * @retval None
  6553. */
  6554. __STATIC_INLINE void LL_C2_APB4_GRP1_DisableClock(uint32_t Periphs)
  6555. {
  6556. CLEAR_BIT(RCC_C2->APB4ENR, Periphs);
  6557. }
  6558. /**
  6559. * @brief Enable C2 APB4 peripherals clock during Low Power (Sleep) mode.
  6560. * @rmtoll APB4LPENR SYSCFGLPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6561. * APB4LPENR LPUART1LPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6562. * APB4LPENR SPI6LPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6563. * APB4LPENR I2C4LPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6564. * APB4LPENR LPTIM2LPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6565. * APB4LPENR LPTIM3LPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6566. * APB4LPENR LPTIM4LPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6567. * APB4LPENR LPTIM5LPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6568. * APB4LPENR COMP12LPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6569. * APB4LPENR VREFLPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6570. * APB4LPENR RTCAPBLPEN LL_C2_APB4_GRP1_EnableClockSleep\n
  6571. * APB4LPENR SAI4LPEN LL_C2_APB4_GRP1_EnableClockSleep
  6572. * @param Periphs This parameter can be a combination of the following values:
  6573. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  6574. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  6575. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  6576. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  6577. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  6578. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  6579. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  6580. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  6581. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  6582. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  6583. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  6584. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  6585. *
  6586. * (*) value not defined in all devices
  6587. * @retval None
  6588. */
  6589. __STATIC_INLINE void LL_C2_APB4_GRP1_EnableClockSleep(uint32_t Periphs)
  6590. {
  6591. __IO uint32_t tmpreg;
  6592. SET_BIT(RCC_C2->APB4LPENR, Periphs);
  6593. /* Delay after an RCC peripheral clock enabling */
  6594. tmpreg = READ_BIT(RCC_C2->APB4LPENR, Periphs);
  6595. (void)tmpreg;
  6596. }
  6597. /**
  6598. * @brief Disable C2 APB4 peripherals clock during Low Power (Sleep) mode.
  6599. * @rmtoll APB4LPENR SYSCFGLPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6600. * APB4LPENR LPUART1LPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6601. * APB4LPENR SPI6LPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6602. * APB4LPENR I2C4LPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6603. * APB4LPENR LPTIM2LPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6604. * APB4LPENR LPTIM3LPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6605. * APB4LPENR LPTIM4LPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6606. * APB4LPENR LPTIM5LPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6607. * APB4LPENR COMP12LPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6608. * APB4LPENR VREFLPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6609. * APB4LPENR RTCAPBLPEN LL_C2_APB4_GRP1_DisableClockSleep\n
  6610. * APB4LPENR SAI4LPEN LL_C2_APB4_GRP1_DisableClockSleep
  6611. * @param Periphs This parameter can be a combination of the following values:
  6612. * @arg @ref LL_APB4_GRP1_PERIPH_SYSCFG
  6613. * @arg @ref LL_APB4_GRP1_PERIPH_LPUART1
  6614. * @arg @ref LL_APB4_GRP1_PERIPH_SPI6
  6615. * @arg @ref LL_APB4_GRP1_PERIPH_I2C4
  6616. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM2
  6617. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM3
  6618. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM4 (*)
  6619. * @arg @ref LL_APB4_GRP1_PERIPH_LPTIM5 (*)
  6620. * @arg @ref LL_APB4_GRP1_PERIPH_COMP12
  6621. * @arg @ref LL_APB4_GRP1_PERIPH_VREF
  6622. * @arg @ref LL_APB4_GRP1_PERIPH_RTCAPB
  6623. * @arg @ref LL_APB4_GRP1_PERIPH_SAI4 (*)
  6624. *
  6625. * (*) value not defined in all devices
  6626. * @retval None
  6627. */
  6628. __STATIC_INLINE void LL_C2_APB4_GRP1_DisableClockSleep(uint32_t Periphs)
  6629. {
  6630. CLEAR_BIT(RCC_C2->APB4LPENR, Periphs);
  6631. }
  6632. /**
  6633. * @}
  6634. */
  6635. #endif /*DUAL_CORE*/
  6636. /**
  6637. * @}
  6638. */
  6639. /**
  6640. * @}
  6641. */
  6642. #endif /* defined(RCC) */
  6643. /**
  6644. * @}
  6645. */
  6646. #ifdef __cplusplus
  6647. }
  6648. #endif
  6649. #endif /* STM32H7xx_LL_BUS_H */