12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233 |
- /**
- ******************************************************************************
- * @file stm32l4xx_ll_rcc.h
- * @author MCD Application Team
- * @brief Header file of RCC LL module.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file in
- * the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- ******************************************************************************
- */
- /* Define to prevent recursive inclusion -------------------------------------*/
- #ifndef STM32L4xx_LL_RCC_H
- #define STM32L4xx_LL_RCC_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* Includes ------------------------------------------------------------------*/
- #include "stm32l4xx.h"
- /** @addtogroup STM32L4xx_LL_Driver
- * @{
- */
- #if defined(RCC)
- /** @defgroup RCC_LL RCC
- * @{
- */
- /* Private types -------------------------------------------------------------*/
- /* Private variables ---------------------------------------------------------*/
- /* Private constants ---------------------------------------------------------*/
- /** @defgroup RCC_LL_Private_Constants RCC Private Constants
- * @{
- */
- /* Defines used to perform offsets*/
- /* Offset used to access to RCC_CCIPR and RCC_CCIPR2 registers */
- #define RCC_OFFSET_CCIPR 0U
- #define RCC_OFFSET_CCIPR2 0x14U
- /**
- * @}
- */
- /* Private macros ------------------------------------------------------------*/
- #if defined(USE_FULL_LL_DRIVER)
- /** @defgroup RCC_LL_Private_Macros RCC Private Macros
- * @{
- */
- /**
- * @}
- */
- #endif /*USE_FULL_LL_DRIVER*/
- /* Exported types ------------------------------------------------------------*/
- #if defined(USE_FULL_LL_DRIVER)
- /** @defgroup RCC_LL_Exported_Types RCC Exported Types
- * @{
- */
- /** @defgroup LL_ES_CLOCK_FREQ Clocks Frequency Structure
- * @{
- */
- /**
- * @brief RCC Clocks Frequency Structure
- */
- typedef struct
- {
- uint32_t SYSCLK_Frequency; /*!< SYSCLK clock frequency */
- uint32_t HCLK_Frequency; /*!< HCLK clock frequency */
- uint32_t PCLK1_Frequency; /*!< PCLK1 clock frequency */
- uint32_t PCLK2_Frequency; /*!< PCLK2 clock frequency */
- } LL_RCC_ClocksTypeDef;
- /**
- * @}
- */
- /**
- * @}
- */
- #endif /* USE_FULL_LL_DRIVER */
- /* Exported constants --------------------------------------------------------*/
- /** @defgroup RCC_LL_Exported_Constants RCC Exported Constants
- * @{
- */
- /** @defgroup RCC_LL_EC_OSC_VALUES Oscillator Values adaptation
- * @brief Defines used to adapt values of different oscillators
- * @note These values could be modified in the user environment according to
- * HW set-up.
- * @{
- */
- #if !defined (HSE_VALUE)
- #define HSE_VALUE 8000000U /*!< Value of the HSE oscillator in Hz */
- #endif /* HSE_VALUE */
- #if !defined (HSI_VALUE)
- #define HSI_VALUE 16000000U /*!< Value of the HSI oscillator in Hz */
- #endif /* HSI_VALUE */
- #if !defined (LSE_VALUE)
- #define LSE_VALUE 32768U /*!< Value of the LSE oscillator in Hz */
- #endif /* LSE_VALUE */
- #if !defined (LSI_VALUE)
- #define LSI_VALUE 32000U /*!< Value of the LSI oscillator in Hz */
- #endif /* LSI_VALUE */
- #if defined(RCC_HSI48_SUPPORT)
- #if !defined (HSI48_VALUE)
- #define HSI48_VALUE 48000000U /*!< Value of the HSI48 oscillator in Hz */
- #endif /* HSI48_VALUE */
- #endif /* RCC_HSI48_SUPPORT */
- #if !defined (EXTERNAL_SAI1_CLOCK_VALUE)
- #define EXTERNAL_SAI1_CLOCK_VALUE 48000U /*!< Value of the SAI1_EXTCLK external oscillator in Hz */
- #endif /* EXTERNAL_SAI1_CLOCK_VALUE */
- #if !defined (EXTERNAL_SAI2_CLOCK_VALUE)
- #define EXTERNAL_SAI2_CLOCK_VALUE 48000U /*!< Value of the SAI2_EXTCLK external oscillator in Hz */
- #endif /* EXTERNAL_SAI2_CLOCK_VALUE */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_CLEAR_FLAG Clear Flags Defines
- * @brief Flags defines which can be used with LL_RCC_WriteReg function
- * @{
- */
- #define LL_RCC_CICR_LSIRDYC RCC_CICR_LSIRDYC /*!< LSI Ready Interrupt Clear */
- #define LL_RCC_CICR_LSERDYC RCC_CICR_LSERDYC /*!< LSE Ready Interrupt Clear */
- #define LL_RCC_CICR_MSIRDYC RCC_CICR_MSIRDYC /*!< MSI Ready Interrupt Clear */
- #define LL_RCC_CICR_HSIRDYC RCC_CICR_HSIRDYC /*!< HSI Ready Interrupt Clear */
- #define LL_RCC_CICR_HSERDYC RCC_CICR_HSERDYC /*!< HSE Ready Interrupt Clear */
- #define LL_RCC_CICR_PLLRDYC RCC_CICR_PLLRDYC /*!< PLL Ready Interrupt Clear */
- #if defined(RCC_HSI48_SUPPORT)
- #define LL_RCC_CICR_HSI48RDYC RCC_CICR_HSI48RDYC /*!< HSI48 Ready Interrupt Clear */
- #endif /* RCC_HSI48_SUPPORT */
- #if defined(RCC_PLLSAI1_SUPPORT)
- #define LL_RCC_CICR_PLLSAI1RDYC RCC_CICR_PLLSAI1RDYC /*!< PLLSAI1 Ready Interrupt Clear */
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT)
- #define LL_RCC_CICR_PLLSAI2RDYC RCC_CICR_PLLSAI2RDYC /*!< PLLSAI2 Ready Interrupt Clear */
- #endif /* RCC_PLLSAI2_SUPPORT */
- #define LL_RCC_CICR_LSECSSC RCC_CICR_LSECSSC /*!< LSE Clock Security System Interrupt Clear */
- #define LL_RCC_CICR_CSSC RCC_CICR_CSSC /*!< Clock Security System Interrupt Clear */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_GET_FLAG Get Flags Defines
- * @brief Flags defines which can be used with LL_RCC_ReadReg function
- * @{
- */
- #define LL_RCC_CIFR_LSIRDYF RCC_CIFR_LSIRDYF /*!< LSI Ready Interrupt flag */
- #define LL_RCC_CIFR_LSERDYF RCC_CIFR_LSERDYF /*!< LSE Ready Interrupt flag */
- #define LL_RCC_CIFR_MSIRDYF RCC_CIFR_MSIRDYF /*!< MSI Ready Interrupt flag */
- #define LL_RCC_CIFR_HSIRDYF RCC_CIFR_HSIRDYF /*!< HSI Ready Interrupt flag */
- #define LL_RCC_CIFR_HSERDYF RCC_CIFR_HSERDYF /*!< HSE Ready Interrupt flag */
- #define LL_RCC_CIFR_PLLRDYF RCC_CIFR_PLLRDYF /*!< PLL Ready Interrupt flag */
- #if defined(RCC_HSI48_SUPPORT)
- #define LL_RCC_CIFR_HSI48RDYF RCC_CIFR_HSI48RDYF /*!< HSI48 Ready Interrupt flag */
- #endif /* RCC_HSI48_SUPPORT */
- #if defined(RCC_PLLSAI1_SUPPORT)
- #define LL_RCC_CIFR_PLLSAI1RDYF RCC_CIFR_PLLSAI1RDYF /*!< PLLSAI1 Ready Interrupt flag */
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT)
- #define LL_RCC_CIFR_PLLSAI2RDYF RCC_CIFR_PLLSAI2RDYF /*!< PLLSAI2 Ready Interrupt flag */
- #endif /* RCC_PLLSAI2_SUPPORT */
- #define LL_RCC_CIFR_LSECSSF RCC_CIFR_LSECSSF /*!< LSE Clock Security System Interrupt flag */
- #define LL_RCC_CIFR_CSSF RCC_CIFR_CSSF /*!< Clock Security System Interrupt flag */
- #define LL_RCC_CSR_FWRSTF RCC_CSR_FWRSTF /*!< Firewall reset flag */
- #define LL_RCC_CSR_LPWRRSTF RCC_CSR_LPWRRSTF /*!< Low-Power reset flag */
- #define LL_RCC_CSR_OBLRSTF RCC_CSR_OBLRSTF /*!< OBL reset flag */
- #define LL_RCC_CSR_PINRSTF RCC_CSR_PINRSTF /*!< PIN reset flag */
- #define LL_RCC_CSR_SFTRSTF RCC_CSR_SFTRSTF /*!< Software Reset flag */
- #define LL_RCC_CSR_IWDGRSTF RCC_CSR_IWDGRSTF /*!< Independent Watchdog reset flag */
- #define LL_RCC_CSR_WWDGRSTF RCC_CSR_WWDGRSTF /*!< Window watchdog reset flag */
- #define LL_RCC_CSR_BORRSTF RCC_CSR_BORRSTF /*!< BOR reset flag */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_IT IT Defines
- * @brief IT defines which can be used with LL_RCC_ReadReg and LL_RCC_WriteReg functions
- * @{
- */
- #define LL_RCC_CIER_LSIRDYIE RCC_CIER_LSIRDYIE /*!< LSI Ready Interrupt Enable */
- #define LL_RCC_CIER_LSERDYIE RCC_CIER_LSERDYIE /*!< LSE Ready Interrupt Enable */
- #define LL_RCC_CIER_MSIRDYIE RCC_CIER_MSIRDYIE /*!< MSI Ready Interrupt Enable */
- #define LL_RCC_CIER_HSIRDYIE RCC_CIER_HSIRDYIE /*!< HSI Ready Interrupt Enable */
- #define LL_RCC_CIER_HSERDYIE RCC_CIER_HSERDYIE /*!< HSE Ready Interrupt Enable */
- #define LL_RCC_CIER_PLLRDYIE RCC_CIER_PLLRDYIE /*!< PLL Ready Interrupt Enable */
- #if defined(RCC_HSI48_SUPPORT)
- #define LL_RCC_CIER_HSI48RDYIE RCC_CIER_HSI48RDYIE /*!< HSI48 Ready Interrupt Enable */
- #endif /* RCC_HSI48_SUPPORT */
- #if defined(RCC_PLLSAI1_SUPPORT)
- #define LL_RCC_CIER_PLLSAI1RDYIE RCC_CIER_PLLSAI1RDYIE /*!< PLLSAI1 Ready Interrupt Enable */
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT)
- #define LL_RCC_CIER_PLLSAI2RDYIE RCC_CIER_PLLSAI2RDYIE /*!< PLLSAI2 Ready Interrupt Enable */
- #endif /* RCC_PLLSAI2_SUPPORT */
- #define LL_RCC_CIER_LSECSSIE RCC_CIER_LSECSSIE /*!< LSE CSS Interrupt Enable */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_LSEDRIVE LSE oscillator drive capability
- * @{
- */
- #define LL_RCC_LSEDRIVE_LOW 0x00000000U /*!< Xtal mode lower driving capability */
- #define LL_RCC_LSEDRIVE_MEDIUMLOW RCC_BDCR_LSEDRV_0 /*!< Xtal mode medium low driving capability */
- #define LL_RCC_LSEDRIVE_MEDIUMHIGH RCC_BDCR_LSEDRV_1 /*!< Xtal mode medium high driving capability */
- #define LL_RCC_LSEDRIVE_HIGH RCC_BDCR_LSEDRV /*!< Xtal mode higher driving capability */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_MSIRANGE MSI clock ranges
- * @{
- */
- #define LL_RCC_MSIRANGE_0 RCC_CR_MSIRANGE_0 /*!< MSI = 100 KHz */
- #define LL_RCC_MSIRANGE_1 RCC_CR_MSIRANGE_1 /*!< MSI = 200 KHz */
- #define LL_RCC_MSIRANGE_2 RCC_CR_MSIRANGE_2 /*!< MSI = 400 KHz */
- #define LL_RCC_MSIRANGE_3 RCC_CR_MSIRANGE_3 /*!< MSI = 800 KHz */
- #define LL_RCC_MSIRANGE_4 RCC_CR_MSIRANGE_4 /*!< MSI = 1 MHz */
- #define LL_RCC_MSIRANGE_5 RCC_CR_MSIRANGE_5 /*!< MSI = 2 MHz */
- #define LL_RCC_MSIRANGE_6 RCC_CR_MSIRANGE_6 /*!< MSI = 4 MHz */
- #define LL_RCC_MSIRANGE_7 RCC_CR_MSIRANGE_7 /*!< MSI = 8 MHz */
- #define LL_RCC_MSIRANGE_8 RCC_CR_MSIRANGE_8 /*!< MSI = 16 MHz */
- #define LL_RCC_MSIRANGE_9 RCC_CR_MSIRANGE_9 /*!< MSI = 24 MHz */
- #define LL_RCC_MSIRANGE_10 RCC_CR_MSIRANGE_10 /*!< MSI = 32 MHz */
- #define LL_RCC_MSIRANGE_11 RCC_CR_MSIRANGE_11 /*!< MSI = 48 MHz */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_MSISRANGE MSI range after Standby mode
- * @{
- */
- #define LL_RCC_MSISRANGE_4 RCC_CSR_MSISRANGE_1 /*!< MSI = 1 MHz */
- #define LL_RCC_MSISRANGE_5 RCC_CSR_MSISRANGE_2 /*!< MSI = 2 MHz */
- #define LL_RCC_MSISRANGE_6 RCC_CSR_MSISRANGE_4 /*!< MSI = 4 MHz */
- #define LL_RCC_MSISRANGE_7 RCC_CSR_MSISRANGE_8 /*!< MSI = 8 MHz */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_LSCO_CLKSOURCE LSCO Selection
- * @{
- */
- #define LL_RCC_LSCO_CLKSOURCE_LSI 0x00000000U /*!< LSI selection for low speed clock */
- #define LL_RCC_LSCO_CLKSOURCE_LSE RCC_BDCR_LSCOSEL /*!< LSE selection for low speed clock */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_SYS_CLKSOURCE System clock switch
- * @{
- */
- #define LL_RCC_SYS_CLKSOURCE_MSI RCC_CFGR_SW_MSI /*!< MSI selection as system clock */
- #define LL_RCC_SYS_CLKSOURCE_HSI RCC_CFGR_SW_HSI /*!< HSI selection as system clock */
- #define LL_RCC_SYS_CLKSOURCE_HSE RCC_CFGR_SW_HSE /*!< HSE selection as system clock */
- #define LL_RCC_SYS_CLKSOURCE_PLL RCC_CFGR_SW_PLL /*!< PLL selection as system clock */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_SYS_CLKSOURCE_STATUS System clock switch status
- * @{
- */
- #define LL_RCC_SYS_CLKSOURCE_STATUS_MSI RCC_CFGR_SWS_MSI /*!< MSI used as system clock */
- #define LL_RCC_SYS_CLKSOURCE_STATUS_HSI RCC_CFGR_SWS_HSI /*!< HSI used as system clock */
- #define LL_RCC_SYS_CLKSOURCE_STATUS_HSE RCC_CFGR_SWS_HSE /*!< HSE used as system clock */
- #define LL_RCC_SYS_CLKSOURCE_STATUS_PLL RCC_CFGR_SWS_PLL /*!< PLL used as system clock */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_SYSCLK_DIV AHB prescaler
- * @{
- */
- #define LL_RCC_SYSCLK_DIV_1 RCC_CFGR_HPRE_DIV1 /*!< SYSCLK not divided */
- #define LL_RCC_SYSCLK_DIV_2 RCC_CFGR_HPRE_DIV2 /*!< SYSCLK divided by 2 */
- #define LL_RCC_SYSCLK_DIV_4 RCC_CFGR_HPRE_DIV4 /*!< SYSCLK divided by 4 */
- #define LL_RCC_SYSCLK_DIV_8 RCC_CFGR_HPRE_DIV8 /*!< SYSCLK divided by 8 */
- #define LL_RCC_SYSCLK_DIV_16 RCC_CFGR_HPRE_DIV16 /*!< SYSCLK divided by 16 */
- #define LL_RCC_SYSCLK_DIV_64 RCC_CFGR_HPRE_DIV64 /*!< SYSCLK divided by 64 */
- #define LL_RCC_SYSCLK_DIV_128 RCC_CFGR_HPRE_DIV128 /*!< SYSCLK divided by 128 */
- #define LL_RCC_SYSCLK_DIV_256 RCC_CFGR_HPRE_DIV256 /*!< SYSCLK divided by 256 */
- #define LL_RCC_SYSCLK_DIV_512 RCC_CFGR_HPRE_DIV512 /*!< SYSCLK divided by 512 */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_APB1_DIV APB low-speed prescaler (APB1)
- * @{
- */
- #define LL_RCC_APB1_DIV_1 RCC_CFGR_PPRE1_DIV1 /*!< HCLK not divided */
- #define LL_RCC_APB1_DIV_2 RCC_CFGR_PPRE1_DIV2 /*!< HCLK divided by 2 */
- #define LL_RCC_APB1_DIV_4 RCC_CFGR_PPRE1_DIV4 /*!< HCLK divided by 4 */
- #define LL_RCC_APB1_DIV_8 RCC_CFGR_PPRE1_DIV8 /*!< HCLK divided by 8 */
- #define LL_RCC_APB1_DIV_16 RCC_CFGR_PPRE1_DIV16 /*!< HCLK divided by 16 */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_APB2_DIV APB high-speed prescaler (APB2)
- * @{
- */
- #define LL_RCC_APB2_DIV_1 RCC_CFGR_PPRE2_DIV1 /*!< HCLK not divided */
- #define LL_RCC_APB2_DIV_2 RCC_CFGR_PPRE2_DIV2 /*!< HCLK divided by 2 */
- #define LL_RCC_APB2_DIV_4 RCC_CFGR_PPRE2_DIV4 /*!< HCLK divided by 4 */
- #define LL_RCC_APB2_DIV_8 RCC_CFGR_PPRE2_DIV8 /*!< HCLK divided by 8 */
- #define LL_RCC_APB2_DIV_16 RCC_CFGR_PPRE2_DIV16 /*!< HCLK divided by 16 */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_STOP_WAKEUPCLOCK Wakeup from Stop and CSS backup clock selection
- * @{
- */
- #define LL_RCC_STOP_WAKEUPCLOCK_MSI 0x00000000U /*!< MSI selection after wake-up from STOP */
- #define LL_RCC_STOP_WAKEUPCLOCK_HSI RCC_CFGR_STOPWUCK /*!< HSI selection after wake-up from STOP */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_MCO1SOURCE MCO1 SOURCE selection
- * @{
- */
- #define LL_RCC_MCO1SOURCE_NOCLOCK 0x00000000U /*!< MCO output disabled, no clock on MCO */
- #define LL_RCC_MCO1SOURCE_SYSCLK RCC_CFGR_MCOSEL_0 /*!< SYSCLK selection as MCO1 source */
- #define LL_RCC_MCO1SOURCE_MSI RCC_CFGR_MCOSEL_1 /*!< MSI selection as MCO1 source */
- #define LL_RCC_MCO1SOURCE_HSI (RCC_CFGR_MCOSEL_0| RCC_CFGR_MCOSEL_1) /*!< HSI16 selection as MCO1 source */
- #define LL_RCC_MCO1SOURCE_HSE RCC_CFGR_MCOSEL_2 /*!< HSE selection as MCO1 source */
- #define LL_RCC_MCO1SOURCE_PLLCLK (RCC_CFGR_MCOSEL_0|RCC_CFGR_MCOSEL_2) /*!< Main PLL selection as MCO1 source */
- #define LL_RCC_MCO1SOURCE_LSI (RCC_CFGR_MCOSEL_1|RCC_CFGR_MCOSEL_2) /*!< LSI selection as MCO1 source */
- #define LL_RCC_MCO1SOURCE_LSE (RCC_CFGR_MCOSEL_0|RCC_CFGR_MCOSEL_1|RCC_CFGR_MCOSEL_2) /*!< LSE selection as MCO1 source */
- #if defined(RCC_HSI48_SUPPORT)
- #define LL_RCC_MCO1SOURCE_HSI48 RCC_CFGR_MCOSEL_3 /*!< HSI48 selection as MCO1 source */
- #endif /* RCC_HSI48_SUPPORT */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_MCO1_DIV MCO1 prescaler
- * @{
- */
- #define LL_RCC_MCO1_DIV_1 RCC_CFGR_MCOPRE_DIV1 /*!< MCO not divided */
- #define LL_RCC_MCO1_DIV_2 RCC_CFGR_MCOPRE_DIV2 /*!< MCO divided by 2 */
- #define LL_RCC_MCO1_DIV_4 RCC_CFGR_MCOPRE_DIV4 /*!< MCO divided by 4 */
- #define LL_RCC_MCO1_DIV_8 RCC_CFGR_MCOPRE_DIV8 /*!< MCO divided by 8 */
- #define LL_RCC_MCO1_DIV_16 RCC_CFGR_MCOPRE_DIV16 /*!< MCO divided by 16 */
- /**
- * @}
- */
- #if defined(USE_FULL_LL_DRIVER)
- /** @defgroup RCC_LL_EC_PERIPH_FREQUENCY Peripheral clock frequency
- * @{
- */
- #define LL_RCC_PERIPH_FREQUENCY_NO 0x00000000U /*!< No clock enabled for the peripheral */
- #define LL_RCC_PERIPH_FREQUENCY_NA 0xFFFFFFFFU /*!< Frequency cannot be provided as external clock */
- /**
- * @}
- */
- #endif /* USE_FULL_LL_DRIVER */
- /** @defgroup RCC_LL_EC_USART1_CLKSOURCE Peripheral USART clock source selection
- * @{
- */
- #define LL_RCC_USART1_CLKSOURCE_PCLK2 (RCC_CCIPR_USART1SEL << 16U) /*!< PCLK2 clock used as USART1 clock source */
- #define LL_RCC_USART1_CLKSOURCE_SYSCLK ((RCC_CCIPR_USART1SEL << 16U) | RCC_CCIPR_USART1SEL_0) /*!< SYSCLK clock used as USART1 clock source */
- #define LL_RCC_USART1_CLKSOURCE_HSI ((RCC_CCIPR_USART1SEL << 16U) | RCC_CCIPR_USART1SEL_1) /*!< HSI clock used as USART1 clock source */
- #define LL_RCC_USART1_CLKSOURCE_LSE ((RCC_CCIPR_USART1SEL << 16U) | RCC_CCIPR_USART1SEL) /*!< LSE clock used as USART1 clock source */
- #define LL_RCC_USART2_CLKSOURCE_PCLK1 (RCC_CCIPR_USART2SEL << 16U) /*!< PCLK1 clock used as USART2 clock source */
- #define LL_RCC_USART2_CLKSOURCE_SYSCLK ((RCC_CCIPR_USART2SEL << 16U) | RCC_CCIPR_USART2SEL_0) /*!< SYSCLK clock used as USART2 clock source */
- #define LL_RCC_USART2_CLKSOURCE_HSI ((RCC_CCIPR_USART2SEL << 16U) | RCC_CCIPR_USART2SEL_1) /*!< HSI clock used as USART2 clock source */
- #define LL_RCC_USART2_CLKSOURCE_LSE ((RCC_CCIPR_USART2SEL << 16U) | RCC_CCIPR_USART2SEL) /*!< LSE clock used as USART2 clock source */
- #if defined(RCC_CCIPR_USART3SEL)
- #define LL_RCC_USART3_CLKSOURCE_PCLK1 (RCC_CCIPR_USART3SEL << 16U) /*!< PCLK1 clock used as USART3 clock source */
- #define LL_RCC_USART3_CLKSOURCE_SYSCLK ((RCC_CCIPR_USART3SEL << 16U) | RCC_CCIPR_USART3SEL_0) /*!< SYSCLK clock used as USART3 clock source */
- #define LL_RCC_USART3_CLKSOURCE_HSI ((RCC_CCIPR_USART3SEL << 16U) | RCC_CCIPR_USART3SEL_1) /*!< HSI clock used as USART3 clock source */
- #define LL_RCC_USART3_CLKSOURCE_LSE ((RCC_CCIPR_USART3SEL << 16U) | RCC_CCIPR_USART3SEL) /*!< LSE clock used as USART3 clock source */
- #endif /* RCC_CCIPR_USART3SEL */
- /**
- * @}
- */
- #if defined(RCC_CCIPR_UART4SEL) || defined(RCC_CCIPR_UART5SEL)
- /** @defgroup RCC_LL_EC_UART4_CLKSOURCE Peripheral UART clock source selection
- * @{
- */
- #if defined(RCC_CCIPR_UART4SEL)
- #define LL_RCC_UART4_CLKSOURCE_PCLK1 (RCC_CCIPR_UART4SEL << 16U) /*!< PCLK1 clock used as UART4 clock source */
- #define LL_RCC_UART4_CLKSOURCE_SYSCLK ((RCC_CCIPR_UART4SEL << 16U) | RCC_CCIPR_UART4SEL_0) /*!< SYSCLK clock used as UART4 clock source */
- #define LL_RCC_UART4_CLKSOURCE_HSI ((RCC_CCIPR_UART4SEL << 16U) | RCC_CCIPR_UART4SEL_1) /*!< HSI clock used as UART4 clock source */
- #define LL_RCC_UART4_CLKSOURCE_LSE ((RCC_CCIPR_UART4SEL << 16U) | RCC_CCIPR_UART4SEL) /*!< LSE clock used as UART4 clock source */
- #endif /* RCC_CCIPR_UART4SEL */
- #if defined(RCC_CCIPR_UART5SEL)
- #define LL_RCC_UART5_CLKSOURCE_PCLK1 (RCC_CCIPR_UART5SEL << 16U) /*!< PCLK1 clock used as UART5 clock source */
- #define LL_RCC_UART5_CLKSOURCE_SYSCLK ((RCC_CCIPR_UART5SEL << 16U) | RCC_CCIPR_UART5SEL_0) /*!< SYSCLK clock used as UART5 clock source */
- #define LL_RCC_UART5_CLKSOURCE_HSI ((RCC_CCIPR_UART5SEL << 16U) | RCC_CCIPR_UART5SEL_1) /*!< HSI clock used as UART5 clock source */
- #define LL_RCC_UART5_CLKSOURCE_LSE ((RCC_CCIPR_UART5SEL << 16U) | RCC_CCIPR_UART5SEL) /*!< LSE clock used as UART5 clock source */
- #endif /* RCC_CCIPR_UART5SEL */
- /**
- * @}
- */
- #endif /* RCC_CCIPR_UART4SEL || RCC_CCIPR_UART5SEL */
- /** @defgroup RCC_LL_EC_LPUART1_CLKSOURCE Peripheral LPUART clock source selection
- * @{
- */
- #define LL_RCC_LPUART1_CLKSOURCE_PCLK1 0x00000000U /*!< PCLK1 clock used as LPUART1 clock source */
- #define LL_RCC_LPUART1_CLKSOURCE_SYSCLK RCC_CCIPR_LPUART1SEL_0 /*!< SYSCLK clock used as LPUART1 clock source */
- #define LL_RCC_LPUART1_CLKSOURCE_HSI RCC_CCIPR_LPUART1SEL_1 /*!< HSI clock used as LPUART1 clock source */
- #define LL_RCC_LPUART1_CLKSOURCE_LSE RCC_CCIPR_LPUART1SEL /*!< LSE clock used as LPUART1 clock source */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_I2C1_CLKSOURCE Peripheral I2C clock source selection
- * @{
- */
- #define LL_RCC_I2C1_CLKSOURCE_PCLK1 (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C1SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C1 clock source */
- #define LL_RCC_I2C1_CLKSOURCE_SYSCLK (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C1SEL_Pos << 16U) | (RCC_CCIPR_I2C1SEL_0 >> RCC_CCIPR_I2C1SEL_Pos)) /*!< SYSCLK clock used as I2C1 clock source */
- #define LL_RCC_I2C1_CLKSOURCE_HSI (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C1SEL_Pos << 16U) | (RCC_CCIPR_I2C1SEL_1 >> RCC_CCIPR_I2C1SEL_Pos)) /*!< HSI clock used as I2C1 clock source */
- #if defined(RCC_CCIPR_I2C2SEL)
- #define LL_RCC_I2C2_CLKSOURCE_PCLK1 (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C2SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C2 clock source */
- #define LL_RCC_I2C2_CLKSOURCE_SYSCLK (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C2SEL_Pos << 16U) | (RCC_CCIPR_I2C2SEL_0 >> RCC_CCIPR_I2C2SEL_Pos)) /*!< SYSCLK clock used as I2C2 clock source */
- #define LL_RCC_I2C2_CLKSOURCE_HSI (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C2SEL_Pos << 16U) | (RCC_CCIPR_I2C2SEL_1 >> RCC_CCIPR_I2C2SEL_Pos)) /*!< HSI clock used as I2C2 clock source */
- #endif /* RCC_CCIPR_I2C2SEL */
- #define LL_RCC_I2C3_CLKSOURCE_PCLK1 (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C3SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C3 clock source */
- #define LL_RCC_I2C3_CLKSOURCE_SYSCLK (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C3SEL_Pos << 16U) | (RCC_CCIPR_I2C3SEL_0 >> RCC_CCIPR_I2C3SEL_Pos)) /*!< SYSCLK clock used as I2C3 clock source */
- #define LL_RCC_I2C3_CLKSOURCE_HSI (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C3SEL_Pos << 16U) | (RCC_CCIPR_I2C3SEL_1 >> RCC_CCIPR_I2C3SEL_Pos)) /*!< HSI clock used as I2C3 clock source */
- #if defined(RCC_CCIPR2_I2C4SEL)
- #define LL_RCC_I2C4_CLKSOURCE_PCLK1 (((uint32_t)RCC_OFFSET_CCIPR2 << 24U) | ((uint32_t)RCC_CCIPR2_I2C4SEL_Pos << 16U)) /*!< PCLK1 clock used as I2C4 clock source */
- #define LL_RCC_I2C4_CLKSOURCE_SYSCLK (((uint32_t)RCC_OFFSET_CCIPR2 << 24U) | ((uint32_t)RCC_CCIPR2_I2C4SEL_Pos << 16U) | (RCC_CCIPR2_I2C4SEL_0 >> RCC_CCIPR2_I2C4SEL_Pos)) /*!< SYSCLK clock used as I2C4 clock source */
- #define LL_RCC_I2C4_CLKSOURCE_HSI (((uint32_t)RCC_OFFSET_CCIPR2 << 24U) | ((uint32_t)RCC_CCIPR2_I2C4SEL_Pos << 16U) | (RCC_CCIPR2_I2C4SEL_1 >> RCC_CCIPR2_I2C4SEL_Pos)) /*!< HSI clock used as I2C4 clock source */
- #endif /* RCC_CCIPR2_I2C4SEL */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_LPTIM1_CLKSOURCE Peripheral LPTIM clock source selection
- * @{
- */
- #define LL_RCC_LPTIM1_CLKSOURCE_PCLK1 RCC_CCIPR_LPTIM1SEL /*!< PCLK1 clock used as LPTIM1 clock source */
- #define LL_RCC_LPTIM1_CLKSOURCE_LSI (RCC_CCIPR_LPTIM1SEL | (RCC_CCIPR_LPTIM1SEL_0 >> 16U)) /*!< LSI clock used as LPTIM1 clock source */
- #define LL_RCC_LPTIM1_CLKSOURCE_HSI (RCC_CCIPR_LPTIM1SEL | (RCC_CCIPR_LPTIM1SEL_1 >> 16U)) /*!< HSI clock used as LPTIM1 clock source */
- #define LL_RCC_LPTIM1_CLKSOURCE_LSE (RCC_CCIPR_LPTIM1SEL | (RCC_CCIPR_LPTIM1SEL >> 16U)) /*!< LSE clock used as LPTIM1 clock source */
- #define LL_RCC_LPTIM2_CLKSOURCE_PCLK1 RCC_CCIPR_LPTIM2SEL /*!< PCLK1 clock used as LPTIM2 clock source */
- #define LL_RCC_LPTIM2_CLKSOURCE_LSI (RCC_CCIPR_LPTIM2SEL | (RCC_CCIPR_LPTIM2SEL_0 >> 16U)) /*!< LSI clock used as LPTIM2 clock source */
- #define LL_RCC_LPTIM2_CLKSOURCE_HSI (RCC_CCIPR_LPTIM2SEL | (RCC_CCIPR_LPTIM2SEL_1 >> 16U)) /*!< HSI clock used as LPTIM2 clock source */
- #define LL_RCC_LPTIM2_CLKSOURCE_LSE (RCC_CCIPR_LPTIM2SEL | (RCC_CCIPR_LPTIM2SEL >> 16U)) /*!< LSE clock used as LPTIM2 clock source */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_SAI1_CLKSOURCE Peripheral SAI clock source selection
- * @{
- */
- #if defined(RCC_CCIPR2_SAI1SEL)
- #define LL_RCC_SAI1_CLKSOURCE_PLLSAI1 (RCC_CCIPR2_SAI1SEL << 16U) /*!< PLLSAI1 (PLLSAI1CLK) clock used as SAI1 clock source */
- #define LL_RCC_SAI1_CLKSOURCE_PLLSAI2 ((RCC_CCIPR2_SAI1SEL << 16U) | RCC_CCIPR2_SAI1SEL_0) /*!< PLLSAI2 (PLLSAI2CLK) clock used as SAI1 clock source */
- #define LL_RCC_SAI1_CLKSOURCE_PLL ((RCC_CCIPR2_SAI1SEL << 16U) | RCC_CCIPR2_SAI1SEL_1) /*!< PLL (PLLSAI3CLK) clock used as SAI1 clock source */
- #define LL_RCC_SAI1_CLKSOURCE_PIN ((RCC_CCIPR2_SAI1SEL << 16U) | (RCC_CCIPR2_SAI1SEL_1 | RCC_CCIPR2_SAI1SEL_0)) /*!< External input clock used as SAI1 clock source */
- #define LL_RCC_SAI1_CLKSOURCE_HSI ((RCC_CCIPR2_SAI1SEL << 16U) | RCC_CCIPR2_SAI1SEL_2) /*!< HSI clock used as SAI1 clock source */
- #elif defined(RCC_CCIPR_SAI1SEL)
- #define LL_RCC_SAI1_CLKSOURCE_PLLSAI1 RCC_CCIPR_SAI1SEL /*!< PLLSAI1 clock used as SAI1 clock source */
- #if defined(RCC_PLLSAI2_SUPPORT)
- #define LL_RCC_SAI1_CLKSOURCE_PLLSAI2 (RCC_CCIPR_SAI1SEL | (RCC_CCIPR_SAI1SEL_0 >> 16U)) /*!< PLLSAI2 clock used as SAI1 clock source */
- #endif /* RCC_PLLSAI2_SUPPORT */
- #define LL_RCC_SAI1_CLKSOURCE_PLL (RCC_CCIPR_SAI1SEL | (RCC_CCIPR_SAI1SEL_1 >> 16U)) /*!< PLL clock used as SAI1 clock source */
- #define LL_RCC_SAI1_CLKSOURCE_PIN (RCC_CCIPR_SAI1SEL | (RCC_CCIPR_SAI1SEL >> 16U)) /*!< External input clock used as SAI1 clock source */
- #endif /* RCC_CCIPR2_SAI1SEL */
- #if defined(RCC_CCIPR2_SAI2SEL)
- #define LL_RCC_SAI2_CLKSOURCE_PLLSAI1 (RCC_CCIPR2_SAI2SEL << 16U) /*!< PLLSAI1 (PLLSAI1CLK) clock used as SAI2 clock source */
- #define LL_RCC_SAI2_CLKSOURCE_PLLSAI2 ((RCC_CCIPR2_SAI2SEL << 16U) | RCC_CCIPR2_SAI2SEL_0) /*!< PLLSAI2 (PLLSAI2CLK) clock used as SAI2 clock source */
- #define LL_RCC_SAI2_CLKSOURCE_PLL ((RCC_CCIPR2_SAI2SEL << 16U) | RCC_CCIPR2_SAI2SEL_1) /*!< PLL (PLLSAI3CLK) clock used as SAI2 clock source */
- #define LL_RCC_SAI2_CLKSOURCE_PIN ((RCC_CCIPR2_SAI2SEL << 16U) | (RCC_CCIPR2_SAI2SEL_1 | RCC_CCIPR2_SAI2SEL_0)) /*!< External input clock used as SAI2 clock source */
- #define LL_RCC_SAI2_CLKSOURCE_HSI ((RCC_CCIPR2_SAI2SEL << 16U) | RCC_CCIPR2_SAI2SEL_2) /*!< HSI clock used as SAI2 clock source */
- #elif defined(RCC_CCIPR_SAI2SEL)
- #define LL_RCC_SAI2_CLKSOURCE_PLLSAI1 RCC_CCIPR_SAI2SEL /*!< PLLSAI1 clock used as SAI2 clock source */
- #if defined(RCC_PLLSAI2_SUPPORT)
- #define LL_RCC_SAI2_CLKSOURCE_PLLSAI2 (RCC_CCIPR_SAI2SEL | (RCC_CCIPR_SAI2SEL_0 >> 16U)) /*!< PLLSAI2 clock used as SAI2 clock source */
- #endif /* RCC_PLLSAI2_SUPPORT */
- #define LL_RCC_SAI2_CLKSOURCE_PLL (RCC_CCIPR_SAI2SEL | (RCC_CCIPR_SAI2SEL_1 >> 16U)) /*!< PLL clock used as SAI2 clock source */
- #define LL_RCC_SAI2_CLKSOURCE_PIN (RCC_CCIPR_SAI2SEL | (RCC_CCIPR_SAI2SEL >> 16U)) /*!< External input clock used as SAI2 clock source */
- #endif /* RCC_CCIPR2_SAI2SEL */
- /**
- * @}
- */
- #if defined(RCC_CCIPR2_SDMMCSEL)
- /** @defgroup RCC_LL_EC_SDMMC1_KERNELCLKSOURCE Peripheral SDMMC kernel clock source selection
- * @{
- */
- #define LL_RCC_SDMMC1_KERNELCLKSOURCE_48CLK 0x00000000U /*!< 48MHz clock from internal multiplexor used as SDMMC1 clock source */
- #define LL_RCC_SDMMC1_KERNELCLKSOURCE_PLLP RCC_CCIPR2_SDMMCSEL /*!< PLLSAI3CLK clock used as SDMMC1 clock source */
- /**
- * @}
- */
- #endif /* RCC_CCIPR2_SDMMCSEL */
- #if defined(SDMMC1)
- /** @defgroup RCC_LL_EC_SDMMC1_CLKSOURCE Peripheral SDMMC clock source selection
- * @{
- */
- #if defined(RCC_HSI48_SUPPORT)
- #define LL_RCC_SDMMC1_CLKSOURCE_HSI48 0x00000000U /*!< HSI48 clock used as SDMMC1 clock source */
- #else
- #define LL_RCC_SDMMC1_CLKSOURCE_NONE 0x00000000U /*!< No clock used as SDMMC1 clock source */
- #endif
- #if defined(RCC_PLLSAI1_SUPPORT)
- #define LL_RCC_SDMMC1_CLKSOURCE_PLLSAI1 RCC_CCIPR_CLK48SEL_0 /*!< PLLSAI1 clock used as SDMMC1 clock source */
- #endif /* RCC_PLLSAI1_SUPPORT */
- #define LL_RCC_SDMMC1_CLKSOURCE_PLL RCC_CCIPR_CLK48SEL_1 /*!< PLL clock used as SDMMC1 clock source */
- #define LL_RCC_SDMMC1_CLKSOURCE_MSI RCC_CCIPR_CLK48SEL /*!< MSI clock used as SDMMC1 clock source */
- /**
- * @}
- */
- #endif /* SDMMC1 */
- /** @defgroup RCC_LL_EC_RNG_CLKSOURCE Peripheral RNG clock source selection
- * @{
- */
- #if defined(RCC_HSI48_SUPPORT)
- #define LL_RCC_RNG_CLKSOURCE_HSI48 0x00000000U /*!< HSI48 clock used as RNG clock source */
- #else
- #define LL_RCC_RNG_CLKSOURCE_NONE 0x00000000U /*!< No clock used as RNG clock source */
- #endif
- #if defined(RCC_PLLSAI1_SUPPORT)
- #define LL_RCC_RNG_CLKSOURCE_PLLSAI1 RCC_CCIPR_CLK48SEL_0 /*!< PLLSAI1 clock used as RNG clock source */
- #endif /* RCC_PLLSAI1_SUPPORT */
- #define LL_RCC_RNG_CLKSOURCE_PLL RCC_CCIPR_CLK48SEL_1 /*!< PLL clock used as RNG clock source */
- #define LL_RCC_RNG_CLKSOURCE_MSI RCC_CCIPR_CLK48SEL /*!< MSI clock used as RNG clock source */
- /**
- * @}
- */
- #if defined(USB_OTG_FS) || defined(USB)
- /** @defgroup RCC_LL_EC_USB_CLKSOURCE Peripheral USB clock source selection
- * @{
- */
- #if defined(RCC_HSI48_SUPPORT)
- #define LL_RCC_USB_CLKSOURCE_HSI48 0x00000000U /*!< HSI48 clock used as USB clock source */
- #else
- #define LL_RCC_USB_CLKSOURCE_NONE 0x00000000U /*!< No clock used as USB clock source */
- #endif
- #if defined(RCC_PLLSAI1_SUPPORT)
- #define LL_RCC_USB_CLKSOURCE_PLLSAI1 RCC_CCIPR_CLK48SEL_0 /*!< PLLSAI1 clock used as USB clock source */
- #endif /* RCC_PLLSAI1_SUPPORT */
- #define LL_RCC_USB_CLKSOURCE_PLL RCC_CCIPR_CLK48SEL_1 /*!< PLL clock used as USB clock source */
- #define LL_RCC_USB_CLKSOURCE_MSI RCC_CCIPR_CLK48SEL /*!< MSI clock used as USB clock source */
- /**
- * @}
- */
- #endif /* USB_OTG_FS || USB */
- /** @defgroup RCC_LL_EC_ADC_CLKSOURCE Peripheral ADC clock source selection
- * @{
- */
- #define LL_RCC_ADC_CLKSOURCE_NONE 0x00000000U /*!< No clock used as ADC clock source */
- #if defined(RCC_PLLSAI1_SUPPORT)
- #define LL_RCC_ADC_CLKSOURCE_PLLSAI1 RCC_CCIPR_ADCSEL_0 /*!< PLLSAI1 clock used as ADC clock source */
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT) && !defined(LTDC)
- #define LL_RCC_ADC_CLKSOURCE_PLLSAI2 RCC_CCIPR_ADCSEL_1 /*!< PLLSAI2 clock used as ADC clock source */
- #endif /* RCC_PLLSAI2_SUPPORT */
- #if defined(RCC_CCIPR_ADCSEL)
- #define LL_RCC_ADC_CLKSOURCE_SYSCLK RCC_CCIPR_ADCSEL /*!< SYSCLK clock used as ADC clock source */
- #else
- #define LL_RCC_ADC_CLKSOURCE_SYSCLK 0x30000000U /*!< SYSCLK clock used as ADC clock source */
- #endif
- /**
- * @}
- */
- #if defined(SWPMI1)
- /** @defgroup RCC_LL_EC_SWPMI1_CLKSOURCE Peripheral SWPMI1 clock source selection
- * @{
- */
- #define LL_RCC_SWPMI1_CLKSOURCE_PCLK1 0x00000000U /*!< PCLK1 used as SWPMI1 clock source */
- #define LL_RCC_SWPMI1_CLKSOURCE_HSI RCC_CCIPR_SWPMI1SEL /*!< HSI used as SWPMI1 clock source */
- /**
- * @}
- */
- #endif /* SWPMI1 */
- #if defined(DFSDM1_Channel0)
- #if defined(RCC_CCIPR2_ADFSDM1SEL)
- /** @defgroup RCC_LL_EC_DFSDM1_AUDIO_CLKSOURCE Peripheral DFSDM1 Audio clock source selection
- * @{
- */
- #define LL_RCC_DFSDM1_AUDIO_CLKSOURCE_SAI1 0x00000000U /*!< SAI1 clock used as DFSDM1 Audio clock */
- #define LL_RCC_DFSDM1_AUDIO_CLKSOURCE_HSI RCC_CCIPR2_ADFSDM1SEL_0 /*!< HSI clock used as DFSDM1 Audio clock */
- #define LL_RCC_DFSDM1_AUDIO_CLKSOURCE_MSI RCC_CCIPR2_ADFSDM1SEL_1 /*!< MSI clock used as DFSDM1 Audio clock */
- /**
- * @}
- */
- #endif /* RCC_CCIPR2_ADFSDM1SEL */
- /** @defgroup RCC_LL_EC_DFSDM1_CLKSOURCE Peripheral DFSDM1 clock source selection
- * @{
- */
- #if defined(RCC_CCIPR2_DFSDM1SEL)
- #define LL_RCC_DFSDM1_CLKSOURCE_PCLK2 0x00000000U /*!< PCLK2 used as DFSDM1 clock source */
- #define LL_RCC_DFSDM1_CLKSOURCE_SYSCLK RCC_CCIPR2_DFSDM1SEL /*!< SYSCLK used as DFSDM1 clock source */
- #else
- #define LL_RCC_DFSDM1_CLKSOURCE_PCLK2 0x00000000U /*!< PCLK2 used as DFSDM1 clock source */
- #define LL_RCC_DFSDM1_CLKSOURCE_SYSCLK RCC_CCIPR_DFSDM1SEL /*!< SYSCLK used as DFSDM1 clock source */
- #endif /* RCC_CCIPR2_DFSDM1SEL */
- /**
- * @}
- */
- #endif /* DFSDM1_Channel0 */
- #if defined(DSI)
- /** @defgroup RCC_LL_EC_DSI_CLKSOURCE Peripheral DSI clock source selection
- * @{
- */
- #define LL_RCC_DSI_CLKSOURCE_PHY 0x00000000U /*!< DSI-PHY clock used as DSI byte lane clock source */
- #define LL_RCC_DSI_CLKSOURCE_PLL RCC_CCIPR2_DSISEL /*!< PLL clock used as DSI byte lane clock source */
- /**
- * @}
- */
- #endif /* DSI */
- #if defined(LTDC)
- /** @defgroup RCC_LL_EC_LTDC_CLKSOURCE Peripheral LTDC clock source selection
- * @{
- */
- #define LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV2 0x00000000U /*!< PLLSAI2DIVR divided by 2 used as LTDC clock source */
- #define LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV4 RCC_CCIPR2_PLLSAI2DIVR_0 /*!< PLLSAI2DIVR divided by 4 used as LTDC clock source */
- #define LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV8 RCC_CCIPR2_PLLSAI2DIVR_1 /*!< PLLSAI2DIVR divided by 8 used as LTDC clock source */
- #define LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV16 RCC_CCIPR2_PLLSAI2DIVR /*!< PLLSAI2DIVR divided by 16 used as LTDC clock source */
- /**
- * @}
- */
- #endif /* LTDC */
- #if defined(OCTOSPI1)
- /** @defgroup RCC_LL_EC_OCTOSPI Peripheral OCTOSPI get clock source
- * @{
- */
- #define LL_RCC_OCTOSPI_CLKSOURCE_SYSCLK 0x00000000U /*!< SYSCLK used as OctoSPI clock source */
- #define LL_RCC_OCTOSPI_CLKSOURCE_MSI RCC_CCIPR2_OSPISEL_0 /*!< MSI used as OctoSPI clock source */
- #define LL_RCC_OCTOSPI_CLKSOURCE_PLL RCC_CCIPR2_OSPISEL_1 /*!< PLL used as OctoSPI clock source */
- /**
- * @}
- */
- #endif /* OCTOSPI1 */
- /** @defgroup RCC_LL_EC_USART1 Peripheral USART get clock source
- * @{
- */
- #define LL_RCC_USART1_CLKSOURCE RCC_CCIPR_USART1SEL /*!< USART1 Clock source selection */
- #define LL_RCC_USART2_CLKSOURCE RCC_CCIPR_USART2SEL /*!< USART2 Clock source selection */
- #if defined(RCC_CCIPR_USART3SEL)
- #define LL_RCC_USART3_CLKSOURCE RCC_CCIPR_USART3SEL /*!< USART3 Clock source selection */
- #endif /* RCC_CCIPR_USART3SEL */
- /**
- * @}
- */
- #if defined(RCC_CCIPR_UART4SEL) || defined(RCC_CCIPR_UART5SEL)
- /** @defgroup RCC_LL_EC_UART4 Peripheral UART get clock source
- * @{
- */
- #if defined(RCC_CCIPR_UART4SEL)
- #define LL_RCC_UART4_CLKSOURCE RCC_CCIPR_UART4SEL /*!< UART4 Clock source selection */
- #endif /* RCC_CCIPR_UART4SEL */
- #if defined(RCC_CCIPR_UART5SEL)
- #define LL_RCC_UART5_CLKSOURCE RCC_CCIPR_UART5SEL /*!< UART5 Clock source selection */
- #endif /* RCC_CCIPR_UART5SEL */
- /**
- * @}
- */
- #endif /* RCC_CCIPR_UART4SEL || RCC_CCIPR_UART5SEL */
- /** @defgroup RCC_LL_EC_LPUART1 Peripheral LPUART get clock source
- * @{
- */
- #define LL_RCC_LPUART1_CLKSOURCE RCC_CCIPR_LPUART1SEL /*!< LPUART1 Clock source selection */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_I2C1 Peripheral I2C get clock source
- * @{
- */
- #define LL_RCC_I2C1_CLKSOURCE (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C1SEL_Pos << 16U) | (RCC_CCIPR_I2C1SEL >> RCC_CCIPR_I2C1SEL_Pos)) /*!< I2C1 Clock source selection */
- #if defined(RCC_CCIPR_I2C2SEL)
- #define LL_RCC_I2C2_CLKSOURCE (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C2SEL_Pos << 16U) | (RCC_CCIPR_I2C2SEL >> RCC_CCIPR_I2C2SEL_Pos)) /*!< I2C2 Clock source selection */
- #endif /* RCC_CCIPR_I2C2SEL */
- #define LL_RCC_I2C3_CLKSOURCE (((uint32_t)RCC_OFFSET_CCIPR << 24U) | ((uint32_t)RCC_CCIPR_I2C3SEL_Pos << 16U) | (RCC_CCIPR_I2C3SEL >> RCC_CCIPR_I2C3SEL_Pos)) /*!< I2C3 Clock source selection */
- #if defined(RCC_CCIPR2_I2C4SEL)
- #define LL_RCC_I2C4_CLKSOURCE (((uint32_t)RCC_OFFSET_CCIPR2 << 24U) | ((uint32_t)RCC_CCIPR2_I2C4SEL_Pos << 16U) | (RCC_CCIPR2_I2C4SEL >> RCC_CCIPR2_I2C4SEL_Pos)) /*!< I2C4 Clock source selection */
- #endif /* RCC_CCIPR2_I2C4SEL */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_LPTIM1 Peripheral LPTIM get clock source
- * @{
- */
- #define LL_RCC_LPTIM1_CLKSOURCE RCC_CCIPR_LPTIM1SEL /*!< LPTIM1 Clock source selection */
- #define LL_RCC_LPTIM2_CLKSOURCE RCC_CCIPR_LPTIM2SEL /*!< LPTIM2 Clock source selection */
- /**
- * @}
- */
- #if defined(RCC_CCIPR_SAI1SEL) || defined(RCC_CCIPR2_SAI1SEL)
- /** @defgroup RCC_LL_EC_SAI1 Peripheral SAI get clock source
- * @{
- */
- #if defined(RCC_CCIPR2_SAI1SEL)
- #define LL_RCC_SAI1_CLKSOURCE RCC_CCIPR2_SAI1SEL /*!< SAI1 Clock source selection */
- #else
- #define LL_RCC_SAI1_CLKSOURCE RCC_CCIPR_SAI1SEL /*!< SAI1 Clock source selection */
- #endif /* RCC_CCIPR2_SAI1SEL */
- #if defined(RCC_CCIPR2_SAI2SEL)
- #define LL_RCC_SAI2_CLKSOURCE RCC_CCIPR2_SAI2SEL /*!< SAI2 Clock source selection */
- #elif defined(RCC_CCIPR_SAI2SEL)
- #define LL_RCC_SAI2_CLKSOURCE RCC_CCIPR_SAI2SEL /*!< SAI2 Clock source selection */
- #endif /* RCC_CCIPR2_SAI2SEL */
- /**
- * @}
- */
- #endif /* RCC_CCIPR_SAI1SEL || RCC_CCIPR2_SAI1SEL */
- #if defined(SDMMC1)
- #if defined(RCC_CCIPR2_SDMMCSEL)
- /** @defgroup RCC_LL_EC_SDMMC1_KERNEL Peripheral SDMMC get kernel clock source
- * @{
- */
- #define LL_RCC_SDMMC1_KERNELCLKSOURCE RCC_CCIPR2_SDMMCSEL /*!< SDMMC1 Kernel Clock source selection */
- /**
- * @}
- */
- #endif /* RCC_CCIPR2_SDMMCSEL */
- /** @defgroup RCC_LL_EC_SDMMC1 Peripheral SDMMC get clock source
- * @{
- */
- #define LL_RCC_SDMMC1_CLKSOURCE RCC_CCIPR_CLK48SEL /*!< SDMMC1 Clock source selection */
- /**
- * @}
- */
- #endif /* SDMMC1 */
- /** @defgroup RCC_LL_EC_RNG Peripheral RNG get clock source
- * @{
- */
- #define LL_RCC_RNG_CLKSOURCE RCC_CCIPR_CLK48SEL /*!< RNG Clock source selection */
- /**
- * @}
- */
- #if defined(USB_OTG_FS) || defined(USB)
- /** @defgroup RCC_LL_EC_USB Peripheral USB get clock source
- * @{
- */
- #define LL_RCC_USB_CLKSOURCE RCC_CCIPR_CLK48SEL /*!< USB Clock source selection */
- /**
- * @}
- */
- #endif /* USB_OTG_FS || USB */
- /** @defgroup RCC_LL_EC_ADC Peripheral ADC get clock source
- * @{
- */
- #if defined(RCC_CCIPR_ADCSEL)
- #define LL_RCC_ADC_CLKSOURCE RCC_CCIPR_ADCSEL /*!< ADC Clock source selection */
- #else
- #define LL_RCC_ADC_CLKSOURCE 0x30000000U /*!< ADC Clock source selection */
- #endif
- /**
- * @}
- */
- #if defined(SWPMI1)
- /** @defgroup RCC_LL_EC_SWPMI1 Peripheral SWPMI1 get clock source
- * @{
- */
- #define LL_RCC_SWPMI1_CLKSOURCE RCC_CCIPR_SWPMI1SEL /*!< SWPMI1 Clock source selection */
- /**
- * @}
- */
- #endif /* SWPMI1 */
- #if defined(DFSDM1_Channel0)
- #if defined(RCC_CCIPR2_ADFSDM1SEL)
- /** @defgroup RCC_LL_EC_DFSDM1_AUDIO Peripheral DFSDM1 Audio get clock source
- * @{
- */
- #define LL_RCC_DFSDM1_AUDIO_CLKSOURCE RCC_CCIPR2_ADFSDM1SEL /* DFSDM1 Audio Clock source selection */
- /**
- * @}
- */
- #endif /* RCC_CCIPR2_ADFSDM1SEL */
- /** @defgroup RCC_LL_EC_DFSDM1 Peripheral DFSDM1 get clock source
- * @{
- */
- #if defined(RCC_CCIPR2_DFSDM1SEL)
- #define LL_RCC_DFSDM1_CLKSOURCE RCC_CCIPR2_DFSDM1SEL /*!< DFSDM1 Clock source selection */
- #else
- #define LL_RCC_DFSDM1_CLKSOURCE RCC_CCIPR_DFSDM1SEL /*!< DFSDM1 Clock source selection */
- #endif /* RCC_CCIPR2_DFSDM1SEL */
- /**
- * @}
- */
- #endif /* DFSDM1_Channel0 */
- #if defined(DSI)
- /** @defgroup RCC_LL_EC_DSI Peripheral DSI get clock source
- * @{
- */
- #define LL_RCC_DSI_CLKSOURCE RCC_CCIPR2_DSISEL /*!< DSI Clock source selection */
- /**
- * @}
- */
- #endif /* DSI */
- #if defined(LTDC)
- /** @defgroup RCC_LL_EC_LTDC Peripheral LTDC get clock source
- * @{
- */
- #define LL_RCC_LTDC_CLKSOURCE RCC_CCIPR2_PLLSAI2DIVR /*!< LTDC Clock source selection */
- /**
- * @}
- */
- #endif /* LTDC */
- #if defined(OCTOSPI1)
- /** @defgroup RCC_LL_EC_OCTOSPI Peripheral OCTOSPI get clock source
- * @{
- */
- #define LL_RCC_OCTOSPI_CLKSOURCE RCC_CCIPR2_OSPISEL /*!< OctoSPI Clock source selection */
- /**
- * @}
- */
- #endif /* OCTOSPI1 */
- /** @defgroup RCC_LL_EC_RTC_CLKSOURCE RTC clock source selection
- * @{
- */
- #define LL_RCC_RTC_CLKSOURCE_NONE 0x00000000U /*!< No clock used as RTC clock */
- #define LL_RCC_RTC_CLKSOURCE_LSE RCC_BDCR_RTCSEL_0 /*!< LSE oscillator clock used as RTC clock */
- #define LL_RCC_RTC_CLKSOURCE_LSI RCC_BDCR_RTCSEL_1 /*!< LSI oscillator clock used as RTC clock */
- #define LL_RCC_RTC_CLKSOURCE_HSE_DIV32 RCC_BDCR_RTCSEL /*!< HSE oscillator clock divided by 32 used as RTC clock */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_PLLSOURCE PLL, PLLSAI1 and PLLSAI2 entry clock source
- * @{
- */
- #define LL_RCC_PLLSOURCE_NONE 0x00000000U /*!< No clock */
- #define LL_RCC_PLLSOURCE_MSI RCC_PLLCFGR_PLLSRC_MSI /*!< MSI clock selected as PLL entry clock source */
- #define LL_RCC_PLLSOURCE_HSI RCC_PLLCFGR_PLLSRC_HSI /*!< HSI16 clock selected as PLL entry clock source */
- #define LL_RCC_PLLSOURCE_HSE RCC_PLLCFGR_PLLSRC_HSE /*!< HSE clock selected as PLL entry clock source */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_PLLM_DIV PLL division factor
- * @{
- */
- #define LL_RCC_PLLM_DIV_1 0x00000000U /*!< Main PLL division factor for PLLM input by 1 */
- #define LL_RCC_PLLM_DIV_2 (RCC_PLLCFGR_PLLM_0) /*!< Main PLL division factor for PLLM input by 2 */
- #define LL_RCC_PLLM_DIV_3 (RCC_PLLCFGR_PLLM_1) /*!< Main PLL division factor for PLLM input by 3 */
- #define LL_RCC_PLLM_DIV_4 (RCC_PLLCFGR_PLLM_1 | RCC_PLLCFGR_PLLM_0) /*!< Main PLL division factor for PLLM input by 4 */
- #define LL_RCC_PLLM_DIV_5 (RCC_PLLCFGR_PLLM_2) /*!< Main PLL division factor for PLLM input by 5 */
- #define LL_RCC_PLLM_DIV_6 (RCC_PLLCFGR_PLLM_2 | RCC_PLLCFGR_PLLM_0) /*!< Main PLL division factor for PLLM input by 6 */
- #define LL_RCC_PLLM_DIV_7 (RCC_PLLCFGR_PLLM_2 | RCC_PLLCFGR_PLLM_1) /*!< Main PLL division factor for PLLM input by 7 */
- #define LL_RCC_PLLM_DIV_8 (RCC_PLLCFGR_PLLM_2 | RCC_PLLCFGR_PLLM_1 | RCC_PLLCFGR_PLLM_0) /*!< Main PLL division factor for PLLM input by 8 */
- #if defined(RCC_PLLM_DIV_1_16_SUPPORT)
- #define LL_RCC_PLLM_DIV_9 (RCC_PLLCFGR_PLLM_3) /*!< Main PLL division factor for PLLM input by 9 */
- #define LL_RCC_PLLM_DIV_10 (RCC_PLLCFGR_PLLM_3 | RCC_PLLCFGR_PLLM_0) /*!< Main PLL division factor for PLLM input by 10 */
- #define LL_RCC_PLLM_DIV_11 (RCC_PLLCFGR_PLLM_3 | RCC_PLLCFGR_PLLM_1) /*!< Main PLL division factor for PLLM input by 11 */
- #define LL_RCC_PLLM_DIV_12 (RCC_PLLCFGR_PLLM_3 | RCC_PLLCFGR_PLLM_1 | RCC_PLLCFGR_PLLM_0) /*!< Main PLL division factor for PLLM input by 12 */
- #define LL_RCC_PLLM_DIV_13 (RCC_PLLCFGR_PLLM_3 | RCC_PLLCFGR_PLLM_2) /*!< Main PLL division factor for PLLM input by 13 */
- #define LL_RCC_PLLM_DIV_14 (RCC_PLLCFGR_PLLM_3 | RCC_PLLCFGR_PLLM_2 | RCC_PLLCFGR_PLLM_0) /*!< Main PLL division factor for PLLM input by 14 */
- #define LL_RCC_PLLM_DIV_15 (RCC_PLLCFGR_PLLM_3 | RCC_PLLCFGR_PLLM_2 | RCC_PLLCFGR_PLLM_1) /*!< Main PLL division factor for PLLM input by 15 */
- #define LL_RCC_PLLM_DIV_16 (RCC_PLLCFGR_PLLM_3 | RCC_PLLCFGR_PLLM_2 | RCC_PLLCFGR_PLLM_1 | RCC_PLLCFGR_PLLM_0) /*!< Main PLL division factor for PLLM input by 16 */
- #endif /* RCC_PLLM_DIV_1_16_SUPPORT */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_PLLR_DIV PLL division factor (PLLR)
- * @{
- */
- #define LL_RCC_PLLR_DIV_2 0x00000000U /*!< Main PLL division factor for PLLCLK (system clock) by 2 */
- #define LL_RCC_PLLR_DIV_4 (RCC_PLLCFGR_PLLR_0) /*!< Main PLL division factor for PLLCLK (system clock) by 4 */
- #define LL_RCC_PLLR_DIV_6 (RCC_PLLCFGR_PLLR_1) /*!< Main PLL division factor for PLLCLK (system clock) by 6 */
- #define LL_RCC_PLLR_DIV_8 (RCC_PLLCFGR_PLLR) /*!< Main PLL division factor for PLLCLK (system clock) by 8 */
- /**
- * @}
- */
- #if defined(RCC_PLLP_SUPPORT)
- /** @defgroup RCC_LL_EC_PLLP_DIV PLL division factor (PLLP)
- * @{
- */
- #if defined(RCC_PLLP_DIV_2_31_SUPPORT)
- #define LL_RCC_PLLP_DIV_2 (RCC_PLLCFGR_PLLPDIV_1) /*!< Main PLL division factor for PLLP output by 2 */
- #define LL_RCC_PLLP_DIV_3 (RCC_PLLCFGR_PLLPDIV_1|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 3 */
- #define LL_RCC_PLLP_DIV_4 (RCC_PLLCFGR_PLLPDIV_2) /*!< Main PLL division factor for PLLP output by 4 */
- #define LL_RCC_PLLP_DIV_5 (RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 5 */
- #define LL_RCC_PLLP_DIV_6 (RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_1) /*!< Main PLL division factor for PLLP output by 6 */
- #define LL_RCC_PLLP_DIV_7 (RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_1|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 7 */
- #define LL_RCC_PLLP_DIV_8 (RCC_PLLCFGR_PLLPDIV_3) /*!< Main PLL division factor for PLLP output by 8 */
- #define LL_RCC_PLLP_DIV_9 (RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 9 */
- #define LL_RCC_PLLP_DIV_10 (RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_1) /*!< Main PLL division factor for PLLP output by 10 */
- #define LL_RCC_PLLP_DIV_11 (RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_1|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 11 */
- #define LL_RCC_PLLP_DIV_12 (RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_2) /*!< Main PLL division factor for PLLP output by 12 */
- #define LL_RCC_PLLP_DIV_13 (RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 13 */
- #define LL_RCC_PLLP_DIV_14 (RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_1) /*!< Main PLL division factor for PLLP output by 14 */
- #define LL_RCC_PLLP_DIV_15 (RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_1|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 15 */
- #define LL_RCC_PLLP_DIV_16 (RCC_PLLCFGR_PLLPDIV_4) /*!< Main PLL division factor for PLLP output by 16 */
- #define LL_RCC_PLLP_DIV_17 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 17 */
- #define LL_RCC_PLLP_DIV_18 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_1) /*!< Main PLL division factor for PLLP output by 18 */
- #define LL_RCC_PLLP_DIV_19 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_1|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 19 */
- #define LL_RCC_PLLP_DIV_20 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_2) /*!< Main PLL division factor for PLLP output by 20 */
- #define LL_RCC_PLLP_DIV_21 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 21 */
- #define LL_RCC_PLLP_DIV_22 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_1) /*!< Main PLL division factor for PLLP output by 22 */
- #define LL_RCC_PLLP_DIV_23 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_1|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 23 */
- #define LL_RCC_PLLP_DIV_24 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_3) /*!< Main PLL division factor for PLLP output by 24 */
- #define LL_RCC_PLLP_DIV_25 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 25 */
- #define LL_RCC_PLLP_DIV_26 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_1) /*!< Main PLL division factor for PLLP output by 26 */
- #define LL_RCC_PLLP_DIV_27 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_1|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 27 */
- #define LL_RCC_PLLP_DIV_28 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_2) /*!< Main PLL division factor for PLLP output by 28 */
- #define LL_RCC_PLLP_DIV_29 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 29 */
- #define LL_RCC_PLLP_DIV_30 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_1) /*!< Main PLL division factor for PLLP output by 30 */
- #define LL_RCC_PLLP_DIV_31 (RCC_PLLCFGR_PLLPDIV_4|RCC_PLLCFGR_PLLPDIV_3|RCC_PLLCFGR_PLLPDIV_2|RCC_PLLCFGR_PLLPDIV_1|RCC_PLLCFGR_PLLPDIV_0) /*!< Main PLL division factor for PLLP output by 31 */
- #else
- #define LL_RCC_PLLP_DIV_7 0x00000000U /*!< Main PLL division factor for PLLP output by 7 */
- #define LL_RCC_PLLP_DIV_17 (RCC_PLLCFGR_PLLP) /*!< Main PLL division factor for PLLP output by 17 */
- #endif /* RCC_PLLP_DIV_2_31_SUPPORT */
- /**
- * @}
- */
- #endif /* RCC_PLLP_SUPPORT */
- /** @defgroup RCC_LL_EC_PLLQ_DIV PLL division factor (PLLQ)
- * @{
- */
- #define LL_RCC_PLLQ_DIV_2 0x00000000U /*!< Main PLL division factor for PLLQ output by 2 */
- #define LL_RCC_PLLQ_DIV_4 (RCC_PLLCFGR_PLLQ_0) /*!< Main PLL division factor for PLLQ output by 4 */
- #define LL_RCC_PLLQ_DIV_6 (RCC_PLLCFGR_PLLQ_1) /*!< Main PLL division factor for PLLQ output by 6 */
- #define LL_RCC_PLLQ_DIV_8 (RCC_PLLCFGR_PLLQ) /*!< Main PLL division factor for PLLQ output by 8 */
- /**
- * @}
- */
- #if defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT)
- /** @defgroup RCC_LL_EC_PLLSAI1M PLLSAI1 division factor (PLLSAI1M)
- * @{
- */
- #define LL_RCC_PLLSAI1M_DIV_1 0x00000000U /*!< PLLSAI1 division factor for PLLSAI1M input by 1 */
- #define LL_RCC_PLLSAI1M_DIV_2 (RCC_PLLSAI1CFGR_PLLSAI1M_0) /*!< PLLSAI1 division factor for PLLSAI1M input by 2 */
- #define LL_RCC_PLLSAI1M_DIV_3 (RCC_PLLSAI1CFGR_PLLSAI1M_1) /*!< PLLSAI1 division factor for PLLSAI1M input by 3 */
- #define LL_RCC_PLLSAI1M_DIV_4 (RCC_PLLSAI1CFGR_PLLSAI1M_1|RCC_PLLSAI1CFGR_PLLSAI1M_0) /*!< PLLSAI1 division factor for PLLSAI1M input by 4 */
- #define LL_RCC_PLLSAI1M_DIV_5 (RCC_PLLSAI1CFGR_PLLSAI1M_2) /*!< PLLSAI1 division factor for PLLSAI1M input by 5 */
- #define LL_RCC_PLLSAI1M_DIV_6 (RCC_PLLSAI1CFGR_PLLSAI1M_2|RCC_PLLSAI1CFGR_PLLSAI1M_0) /*!< PLLSAI1 division factor for PLLSAI1M input by 6 */
- #define LL_RCC_PLLSAI1M_DIV_7 (RCC_PLLSAI1CFGR_PLLSAI1M_2|RCC_PLLSAI1CFGR_PLLSAI1M_1) /*!< PLLSAI1 division factor for PLLSAI1M input by 7 */
- #define LL_RCC_PLLSAI1M_DIV_8 (RCC_PLLSAI1CFGR_PLLSAI1M_2|RCC_PLLSAI1CFGR_PLLSAI1M_1|RCC_PLLSAI1CFGR_PLLSAI1M_0) /*!< PLLSAI1 division factor for PLLSAI1M input by 8 */
- #define LL_RCC_PLLSAI1M_DIV_9 (RCC_PLLSAI1CFGR_PLLSAI1M_3) /*!< PLLSAI1 division factor for PLLSAI1M input by 9 */
- #define LL_RCC_PLLSAI1M_DIV_10 (RCC_PLLSAI1CFGR_PLLSAI1M_3|RCC_PLLSAI1CFGR_PLLSAI1M_0) /*!< PLLSAI1 division factor for PLLSAI1M input by 10 */
- #define LL_RCC_PLLSAI1M_DIV_11 (RCC_PLLSAI1CFGR_PLLSAI1M_3|RCC_PLLSAI1CFGR_PLLSAI1M_1) /*!< PLLSAI1 division factor for PLLSAI1M input by 11 */
- #define LL_RCC_PLLSAI1M_DIV_12 (RCC_PLLSAI1CFGR_PLLSAI1M_3|RCC_PLLSAI1CFGR_PLLSAI1M_1|RCC_PLLSAI1CFGR_PLLSAI1M_0) /*!< PLLSAI1 division factor for PLLSAI1M input by 12 */
- #define LL_RCC_PLLSAI1M_DIV_13 (RCC_PLLSAI1CFGR_PLLSAI1M_3|RCC_PLLSAI1CFGR_PLLSAI1M_2) /*!< PLLSAI1 division factor for PLLSAI1M input by 13 */
- #define LL_RCC_PLLSAI1M_DIV_14 (RCC_PLLSAI1CFGR_PLLSAI1M_3|RCC_PLLSAI1CFGR_PLLSAI1M_2|RCC_PLLSAI1CFGR_PLLSAI1M_0) /*!< PLLSAI1 division factor for PLLSAI1M input by 14 */
- #define LL_RCC_PLLSAI1M_DIV_15 (RCC_PLLSAI1CFGR_PLLSAI1M_3|RCC_PLLSAI1CFGR_PLLSAI1M_2|RCC_PLLSAI1CFGR_PLLSAI1M_1) /*!< PLLSAI1 division factor for PLLSAI1M input by 15 */
- #define LL_RCC_PLLSAI1M_DIV_16 (RCC_PLLSAI1CFGR_PLLSAI1M_3|RCC_PLLSAI1CFGR_PLLSAI1M_2|RCC_PLLSAI1CFGR_PLLSAI1M_1|RCC_PLLSAI1CFGR_PLLSAI1M_0) /*!< PLLSAI1 division factor for PLLSAI1M input by 16 */
- /**
- * @}
- */
- #endif /* RCC_PLLSAI1M_DIV_1_16_SUPPORT */
- #if defined(RCC_PLLSAI1_SUPPORT)
- /** @defgroup RCC_LL_EC_PLLSAI1Q PLLSAI1 division factor (PLLSAI1Q)
- * @{
- */
- #define LL_RCC_PLLSAI1Q_DIV_2 0x00000000U /*!< PLLSAI1 division factor for PLLSAI1Q output by 2 */
- #define LL_RCC_PLLSAI1Q_DIV_4 (RCC_PLLSAI1CFGR_PLLSAI1Q_0) /*!< PLLSAI1 division factor for PLLSAI1Q output by 4 */
- #define LL_RCC_PLLSAI1Q_DIV_6 (RCC_PLLSAI1CFGR_PLLSAI1Q_1) /*!< PLLSAI1 division factor for PLLSAI1Q output by 6 */
- #define LL_RCC_PLLSAI1Q_DIV_8 (RCC_PLLSAI1CFGR_PLLSAI1Q) /*!< PLLSAI1 division factor for PLLSAI1Q output by 8 */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_PLLSAI1P PLLSAI1 division factor (PLLSAI1P)
- * @{
- */
- #if defined(RCC_PLLSAI1P_DIV_2_31_SUPPORT)
- #define LL_RCC_PLLSAI1P_DIV_2 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_1) /*!< PLLSAI1 division factor for PLLSAI1P output by 2 */
- #define LL_RCC_PLLSAI1P_DIV_3 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_1|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 3 */
- #define LL_RCC_PLLSAI1P_DIV_4 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_2) /*!< PLLSAI1 division factor for PLLSAI1P output by 4 */
- #define LL_RCC_PLLSAI1P_DIV_5 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 5 */
- #define LL_RCC_PLLSAI1P_DIV_6 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1) /*!< PLLSAI1 division factor for PLLSAI1P output by 6 */
- #define LL_RCC_PLLSAI1P_DIV_7 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 7 */
- #define LL_RCC_PLLSAI1P_DIV_8 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_3) /*!< PLLSAI1 division factor for PLLSAI1P output by 8 */
- #define LL_RCC_PLLSAI1P_DIV_9 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 9 */
- #define LL_RCC_PLLSAI1P_DIV_10 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1) /*!< PLLSAI1 division factor for PLLSAI1P output by 10 */
- #define LL_RCC_PLLSAI1P_DIV_11 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 1 */
- #define LL_RCC_PLLSAI1P_DIV_12 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2) /*!< PLLSAI1 division factor for PLLSAI1P output by 12 */
- #define LL_RCC_PLLSAI1P_DIV_13 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 13 */
- #define LL_RCC_PLLSAI1P_DIV_14 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1) /*!< PLLSAI1 division factor for PLLSAI1P output by 14 */
- #define LL_RCC_PLLSAI1P_DIV_15 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 15 */
- #define LL_RCC_PLLSAI1P_DIV_16 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4) /*!< PLLSAI1 division factor for PLLSAI1P output by 16 */
- #define LL_RCC_PLLSAI1P_DIV_17 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 17 */
- #define LL_RCC_PLLSAI1P_DIV_18 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1) /*!< PLLSAI1 division factor for PLLSAI1P output by 18 */
- #define LL_RCC_PLLSAI1P_DIV_19 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 19 */
- #define LL_RCC_PLLSAI1P_DIV_20 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2) /*!< PLLSAI1 division factor for PLLSAI1P output by 20 */
- #define LL_RCC_PLLSAI1P_DIV_21 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division fctor for PLLSAI1P output by 21 */
- #define LL_RCC_PLLSAI1P_DIV_22 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1) /*!< PLLSAI1 division factor for PLLSAI1P output by 22 */
- #define LL_RCC_PLLSAI1P_DIV_23 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 23 */
- #define LL_RCC_PLLSAI1P_DIV_24 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_3) /*!< PLLSAI1 division factor for PLLSAI1P output by 24 */
- #define LL_RCC_PLLSAI1P_DIV_25 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 25 */
- #define LL_RCC_PLLSAI1P_DIV_26 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1) /*!< PLLSAI1 division factor for PLLSAI1P output by 26 */
- #define LL_RCC_PLLSAI1P_DIV_27 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 27 */
- #define LL_RCC_PLLSAI1P_DIV_28 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2) /*!< PLLSAI1 division factor for PLLSAI1P output by 28 */
- #define LL_RCC_PLLSAI1P_DIV_29 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 29 */
- #define LL_RCC_PLLSAI1P_DIV_30 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1) /*!< PLLSAI1 division factor for PLLSAI1P output by 30 */
- #define LL_RCC_PLLSAI1P_DIV_31 (RCC_PLLSAI1CFGR_PLLSAI1PDIV_4|RCC_PLLSAI1CFGR_PLLSAI1PDIV_3|RCC_PLLSAI1CFGR_PLLSAI1PDIV_2|RCC_PLLSAI1CFGR_PLLSAI1PDIV_1|RCC_PLLSAI1CFGR_PLLSAI1PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 31 */
- #else
- #define LL_RCC_PLLSAI1P_DIV_7 0x00000000U /*!< PLLSAI1 division factor for PLLSAI1P output by 7 */
- #define LL_RCC_PLLSAI1P_DIV_17 (RCC_PLLSAI1CFGR_PLLSAI1P) /*!< PLLSAI1 division factor for PLLSAI1P output by 17 */
- #endif /* RCC_PLLSAI1P_DIV_2_31_SUPPORT */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_PLLSAI1R PLLSAI1 division factor (PLLSAI1R)
- * @{
- */
- #define LL_RCC_PLLSAI1R_DIV_2 0x00000000U /*!< PLLSAI1 division factor for PLLSAI1R output by 2 */
- #define LL_RCC_PLLSAI1R_DIV_4 (RCC_PLLSAI1CFGR_PLLSAI1R_0) /*!< PLLSAI1 division factor for PLLSAI1R output by 4 */
- #define LL_RCC_PLLSAI1R_DIV_6 (RCC_PLLSAI1CFGR_PLLSAI1R_1) /*!< PLLSAI1 division factor for PLLSAI1R output by 6 */
- #define LL_RCC_PLLSAI1R_DIV_8 (RCC_PLLSAI1CFGR_PLLSAI1R) /*!< PLLSAI1 division factor for PLLSAI1R output by 8 */
- /**
- * @}
- */
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT)
- #if defined(RCC_PLLSAI2M_DIV_1_16_SUPPORT)
- /** @defgroup RCC_LL_EC_PLLSAI2M PLLSAI1 division factor (PLLSAI2M)
- * @{
- */
- #define LL_RCC_PLLSAI2M_DIV_1 0x00000000U /*!< PLLSAI2 division factor for PLLSAI2M input by 1 */
- #define LL_RCC_PLLSAI2M_DIV_2 (RCC_PLLSAI2CFGR_PLLSAI2M_0) /*!< PLLSAI2 division factor for PLLSAI2M input by 2 */
- #define LL_RCC_PLLSAI2M_DIV_3 (RCC_PLLSAI2CFGR_PLLSAI2M_1) /*!< PLLSAI2 division factor for PLLSAI2M input by 3 */
- #define LL_RCC_PLLSAI2M_DIV_4 (RCC_PLLSAI2CFGR_PLLSAI2M_1|RCC_PLLSAI2CFGR_PLLSAI2M_0) /*!< PLLSAI2 division factor for PLLSAI2M input by 4 */
- #define LL_RCC_PLLSAI2M_DIV_5 (RCC_PLLSAI2CFGR_PLLSAI2M_2) /*!< PLLSAI2 division factor for PLLSAI2M input by 5 */
- #define LL_RCC_PLLSAI2M_DIV_6 (RCC_PLLSAI2CFGR_PLLSAI2M_2|RCC_PLLSAI2CFGR_PLLSAI2M_0) /*!< PLLSAI2 division factor for PLLSAI2M input by 6 */
- #define LL_RCC_PLLSAI2M_DIV_7 (RCC_PLLSAI2CFGR_PLLSAI2M_2|RCC_PLLSAI2CFGR_PLLSAI2M_1) /*!< PLLSAI2 division factor for PLLSAI2M input by 7 */
- #define LL_RCC_PLLSAI2M_DIV_8 (RCC_PLLSAI2CFGR_PLLSAI2M_2|RCC_PLLSAI2CFGR_PLLSAI2M_1|RCC_PLLSAI2CFGR_PLLSAI2M_0) /*!< PLLSAI2 division factor for PLLSAI2M input by 8 */
- #define LL_RCC_PLLSAI2M_DIV_9 (RCC_PLLSAI2CFGR_PLLSAI2M_3) /*!< PLLSAI2 division factor for PLLSAI2M input by 9 */
- #define LL_RCC_PLLSAI2M_DIV_10 (RCC_PLLSAI2CFGR_PLLSAI2M_3|RCC_PLLSAI2CFGR_PLLSAI2M_0) /*!< PLLSAI2 division factor for PLLSAI2M input by 10 */
- #define LL_RCC_PLLSAI2M_DIV_11 (RCC_PLLSAI2CFGR_PLLSAI2M_3|RCC_PLLSAI2CFGR_PLLSAI2M_1) /*!< PLLSAI2 division factor for PLLSAI2M input by 11 */
- #define LL_RCC_PLLSAI2M_DIV_12 (RCC_PLLSAI2CFGR_PLLSAI2M_3|RCC_PLLSAI2CFGR_PLLSAI2M_1|RCC_PLLSAI2CFGR_PLLSAI2M_0) /*!< PLLSAI2 division factor for PLLSAI2M input by 12 */
- #define LL_RCC_PLLSAI2M_DIV_13 (RCC_PLLSAI2CFGR_PLLSAI2M_3|RCC_PLLSAI2CFGR_PLLSAI2M_2) /*!< PLLSAI2 division factor for PLLSAI2M input by 13 */
- #define LL_RCC_PLLSAI2M_DIV_14 (RCC_PLLSAI2CFGR_PLLSAI2M_3|RCC_PLLSAI2CFGR_PLLSAI2M_2|RCC_PLLSAI2CFGR_PLLSAI2M_0) /*!< PLLSAI2 division factor for PLLSAI2M input by 14 */
- #define LL_RCC_PLLSAI2M_DIV_15 (RCC_PLLSAI2CFGR_PLLSAI2M_3|RCC_PLLSAI2CFGR_PLLSAI2M_2|RCC_PLLSAI2CFGR_PLLSAI2M_1) /*!< PLLSAI2 division factor for PLLSAI2M input by 15 */
- #define LL_RCC_PLLSAI2M_DIV_16 (RCC_PLLSAI2CFGR_PLLSAI2M_3|RCC_PLLSAI2CFGR_PLLSAI2M_2|RCC_PLLSAI2CFGR_PLLSAI2M_1|RCC_PLLSAI2CFGR_PLLSAI2M_0) /*!< PLLSAI2 division factor for PLLSAI2M input by 16 */
- /**
- * @}
- */
- #endif /* RCC_PLLSAI2M_DIV_1_16_SUPPORT */
- #if defined(RCC_PLLSAI2Q_DIV_SUPPORT)
- /** @defgroup RCC_LL_EC_PLLSAI2Q PLLSAI2 division factor (PLLSAI2Q)
- * @{
- */
- #define LL_RCC_PLLSAI2Q_DIV_2 0x00000000U /*!< PLLSAI2 division factor for PLLSAI2Q output by 2 */
- #define LL_RCC_PLLSAI2Q_DIV_4 (RCC_PLLSAI2CFGR_PLLSAI2Q_0) /*!< PLLSAI2 division factor for PLLSAI2Q output by 4 */
- #define LL_RCC_PLLSAI2Q_DIV_6 (RCC_PLLSAI2CFGR_PLLSAI2Q_1) /*!< PLLSAI2 division factor for PLLSAI2Q output by 6 */
- #define LL_RCC_PLLSAI2Q_DIV_8 (RCC_PLLSAI2CFGR_PLLSAI2Q) /*!< PLLSAI2 division factor for PLLSAI2Q output by 8 */
- /**
- * @}
- */
- #endif /* RCC_PLLSAI2Q_DIV_SUPPORT */
- /** @defgroup RCC_LL_EC_PLLSAI2P PLLSAI2 division factor (PLLSAI2P)
- * @{
- */
- #if defined(RCC_PLLSAI2P_DIV_2_31_SUPPORT)
- #define LL_RCC_PLLSAI2P_DIV_2 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_1) /*!< PLLSAI2 division factor for PLLSAI2P output by 2 */
- #define LL_RCC_PLLSAI2P_DIV_3 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_1|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 3 */
- #define LL_RCC_PLLSAI2P_DIV_4 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_2) /*!< PLLSAI2 division factor for PLLSAI2P output by 4 */
- #define LL_RCC_PLLSAI2P_DIV_5 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 5 */
- #define LL_RCC_PLLSAI2P_DIV_6 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1) /*!< PLLSAI2 division factor for PLLSAI2P output by 6 */
- #define LL_RCC_PLLSAI2P_DIV_7 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 7 */
- #define LL_RCC_PLLSAI2P_DIV_8 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_3) /*!< PLLSAI2 division factor for PLLSAI2P output by 8 */
- #define LL_RCC_PLLSAI2P_DIV_9 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 9 */
- #define LL_RCC_PLLSAI2P_DIV_10 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1) /*!< PLLSAI2 division factor for PLLSAI2P output by 10 */
- #define LL_RCC_PLLSAI2P_DIV_11 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 1 */
- #define LL_RCC_PLLSAI2P_DIV_12 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2) /*!< PLLSAI2 division factor for PLLSAI2P output by 12 */
- #define LL_RCC_PLLSAI2P_DIV_13 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 13 */
- #define LL_RCC_PLLSAI2P_DIV_14 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1) /*!< PLLSAI2 division factor for PLLSAI2P output by 14 */
- #define LL_RCC_PLLSAI2P_DIV_15 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 15 */
- #define LL_RCC_PLLSAI2P_DIV_16 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4) /*!< PLLSAI2 division factor for PLLSAI2P output by 16 */
- #define LL_RCC_PLLSAI2P_DIV_17 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 17 */
- #define LL_RCC_PLLSAI2P_DIV_18 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1) /*!< PLLSAI2 division factor for PLLSAI2P output by 18 */
- #define LL_RCC_PLLSAI2P_DIV_19 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 19 */
- #define LL_RCC_PLLSAI2P_DIV_20 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2) /*!< PLLSAI2 division factor for PLLSAI2P output by 20 */
- #define LL_RCC_PLLSAI2P_DIV_21 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division fctor for PLLSAI2P output by 21 */
- #define LL_RCC_PLLSAI2P_DIV_22 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1) /*!< PLLSAI2 division factor for PLLSAI2P output by 22 */
- #define LL_RCC_PLLSAI2P_DIV_23 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 23 */
- #define LL_RCC_PLLSAI2P_DIV_24 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_3) /*!< PLLSAI2 division factor for PLLSAI2P output by 24 */
- #define LL_RCC_PLLSAI2P_DIV_25 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 25 */
- #define LL_RCC_PLLSAI2P_DIV_26 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1) /*!< PLLSAI2 division factor for PLLSAI2P output by 26 */
- #define LL_RCC_PLLSAI2P_DIV_27 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 27 */
- #define LL_RCC_PLLSAI2P_DIV_28 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2) /*!< PLLSAI2 division factor for PLLSAI2P output by 28 */
- #define LL_RCC_PLLSAI2P_DIV_29 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI2 division factor for PLLSAI2P output by 29 */
- #define LL_RCC_PLLSAI2P_DIV_30 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1) /*!< PLLSAI2 division factor for PLLSAI2P output by 30 */
- #define LL_RCC_PLLSAI2P_DIV_31 (RCC_PLLSAI2CFGR_PLLSAI2PDIV_4|RCC_PLLSAI2CFGR_PLLSAI2PDIV_3|RCC_PLLSAI2CFGR_PLLSAI2PDIV_2|RCC_PLLSAI2CFGR_PLLSAI2PDIV_1|RCC_PLLSAI2CFGR_PLLSAI2PDIV_0) /*!< PLLSAI1 division factor for PLLSAI1P output by 31 */
- #else
- #define LL_RCC_PLLSAI2P_DIV_7 0x00000000U /*!< PLLSAI2 division factor for PLLSAI2P output by 7 */
- #define LL_RCC_PLLSAI2P_DIV_17 (RCC_PLLSAI2CFGR_PLLSAI2P) /*!< PLLSAI2 division factor for PLLSAI2P output by 17 */
- #endif /* RCC_PLLSAI2P_DIV_2_31_SUPPORT */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EC_PLLSAI2R PLLSAI2 division factor (PLLSAI2R)
- * @{
- */
- #define LL_RCC_PLLSAI2R_DIV_2 0x00000000U /*!< PLLSAI2 division factor for PLLSAI2R output by 2 */
- #define LL_RCC_PLLSAI2R_DIV_4 (RCC_PLLSAI2CFGR_PLLSAI2R_0) /*!< PLLSAI2 division factor for PLLSAI2R output by 4 */
- #define LL_RCC_PLLSAI2R_DIV_6 (RCC_PLLSAI2CFGR_PLLSAI2R_1) /*!< PLLSAI2 division factor for PLLSAI2R output by 6 */
- #define LL_RCC_PLLSAI2R_DIV_8 (RCC_PLLSAI2CFGR_PLLSAI2R) /*!< PLLSAI2 division factor for PLLSAI2R output by 8 */
- /**
- * @}
- */
- #if defined(RCC_CCIPR2_PLLSAI2DIVR)
- /** @defgroup RCC_LL_EC_PLLSAI2DIVR PLLSAI2DIVR division factor (PLLSAI2DIVR)
- * @{
- */
- #define LL_RCC_PLLSAI2DIVR_DIV_2 0x00000000U /*!< PLLSAI2 division factor for PLLSAI2DIVR output by 2 */
- #define LL_RCC_PLLSAI2DIVR_DIV_4 RCC_CCIPR2_PLLSAI2DIVR_0 /*!< PLLSAI2 division factor for PLLSAI2DIVR output by 4 */
- #define LL_RCC_PLLSAI2DIVR_DIV_8 RCC_CCIPR2_PLLSAI2DIVR_1 /*!< PLLSAI2 division factor for PLLSAI2DIVR output by 8 */
- #define LL_RCC_PLLSAI2DIVR_DIV_16 (RCC_CCIPR2_PLLSAI2DIVR_1 | RCC_CCIPR2_PLLSAI2DIVR_0) /*!< PLLSAI2 division factor for PLLSAI2DIVR output by 16 */
- /**
- * @}
- */
- #endif /* RCC_CCIPR2_PLLSAI2DIVR */
- #endif /* RCC_PLLSAI2_SUPPORT */
- /** @defgroup RCC_LL_EC_MSIRANGESEL MSI clock range selection
- * @{
- */
- #define LL_RCC_MSIRANGESEL_STANDBY 0U /*!< MSI Range is provided by MSISRANGE */
- #define LL_RCC_MSIRANGESEL_RUN 1U /*!< MSI Range is provided by MSIRANGE */
- /**
- * @}
- */
- #if defined(RCC_CSR_LSIPREDIV)
- /** @defgroup RCC_LL_EC_LSIPREDIV LSI division factor
- * @{
- */
- #define LL_RCC_LSI_PREDIV_1 0x00000000U /*!< LSI division factor by 1 */
- #define LL_RCC_LSI_PREDIV_128 RCC_CSR_LSIPREDIV /*!< LSI division factor by 128 */
- /**
- * @}
- */
- #endif /* RCC_CSR_LSIPREDIV */
- /** Legacy definitions for compatibility purpose
- @cond 0
- */
- #if defined(DFSDM1_Channel0)
- #define LL_RCC_DFSDM1_CLKSOURCE_PCLK LL_RCC_DFSDM1_CLKSOURCE_PCLK2
- #define LL_RCC_DFSDM_CLKSOURCE_PCLK LL_RCC_DFSDM1_CLKSOURCE_PCLK2
- #define LL_RCC_DFSDM_CLKSOURCE_SYSCLK LL_RCC_DFSDM1_CLKSOURCE_SYSCLK
- #define LL_RCC_DFSDM_CLKSOURCE LL_RCC_DFSDM1_CLKSOURCE
- #endif /* DFSDM1_Channel0 */
- #if defined(SWPMI1)
- #define LL_RCC_SWPMI1_CLKSOURCE_PCLK LL_RCC_SWPMI1_CLKSOURCE_PCLK1
- #endif /* SWPMI1 */
- /**
- @endcond
- */
- /**
- * @}
- */
- /* Exported macro ------------------------------------------------------------*/
- /** @defgroup RCC_LL_Exported_Macros RCC Exported Macros
- * @{
- */
- /** @defgroup RCC_LL_EM_WRITE_READ Common Write and read registers Macros
- * @{
- */
- /**
- * @brief Write a value in RCC register
- * @param __REG__ Register to be written
- * @param __VALUE__ Value to be written in the register
- * @retval None
- */
- #define LL_RCC_WriteReg(__REG__, __VALUE__) WRITE_REG(RCC->__REG__, (__VALUE__))
- /**
- * @brief Read a value in RCC register
- * @param __REG__ Register to be read
- * @retval Register value
- */
- #define LL_RCC_ReadReg(__REG__) READ_REG(RCC->__REG__)
- /**
- * @}
- */
- /** @defgroup RCC_LL_EM_CALC_FREQ Calculate frequencies
- * @{
- */
- /**
- * @brief Helper macro to calculate the PLLCLK frequency on system domain
- * @note ex: @ref __LL_RCC_CALC_PLLCLK_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLL_GetN (), @ref LL_RCC_PLL_GetR ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @arg @ref LL_RCC_PLLM_DIV_9 (*)
- * @arg @ref LL_RCC_PLLM_DIV_10 (*)
- * @arg @ref LL_RCC_PLLM_DIV_11 (*)
- * @arg @ref LL_RCC_PLLM_DIV_12 (*)
- * @arg @ref LL_RCC_PLLM_DIV_13 (*)
- * @arg @ref LL_RCC_PLLM_DIV_14 (*)
- * @arg @ref LL_RCC_PLLM_DIV_15 (*)
- * @arg @ref LL_RCC_PLLM_DIV_16 (*)
- *
- * (*) value not defined in all devices.
- * @param __PLLN__ Between 8 and 86 or 127 depending on devices
- * @param __PLLR__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLR_DIV_2
- * @arg @ref LL_RCC_PLLR_DIV_4
- * @arg @ref LL_RCC_PLLR_DIV_6
- * @arg @ref LL_RCC_PLLR_DIV_8
- * @retval PLL clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLCLK_FREQ(__INPUTFREQ__, __PLLM__, __PLLN__, __PLLR__) ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) * (__PLLN__) / \
- ((((__PLLR__) >> RCC_PLLCFGR_PLLR_Pos) + 1U) * 2U))
- #if defined(RCC_PLLSAI1_SUPPORT)
- #if defined(RCC_PLLP_DIV_2_31_SUPPORT)
- /**
- * @brief Helper macro to calculate the PLLCLK frequency used on SAI domain
- * @note ex: @ref __LL_RCC_CALC_PLLCLK_SAI_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLL_GetN (), @ref LL_RCC_PLL_GetP ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @arg @ref LL_RCC_PLLM_DIV_9 (*)
- * @arg @ref LL_RCC_PLLM_DIV_10 (*)
- * @arg @ref LL_RCC_PLLM_DIV_11 (*)
- * @arg @ref LL_RCC_PLLM_DIV_12 (*)
- * @arg @ref LL_RCC_PLLM_DIV_13 (*)
- * @arg @ref LL_RCC_PLLM_DIV_14 (*)
- * @arg @ref LL_RCC_PLLM_DIV_15 (*)
- * @arg @ref LL_RCC_PLLM_DIV_16 (*)
- *
- * (*) value not defined in all devices.
- * @param __PLLN__ Between 8 and 86 or 127 depending on devices
- * @param __PLLP__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLP_DIV_2
- * @arg @ref LL_RCC_PLLP_DIV_3
- * @arg @ref LL_RCC_PLLP_DIV_4
- * @arg @ref LL_RCC_PLLP_DIV_5
- * @arg @ref LL_RCC_PLLP_DIV_6
- * @arg @ref LL_RCC_PLLP_DIV_7
- * @arg @ref LL_RCC_PLLP_DIV_8
- * @arg @ref LL_RCC_PLLP_DIV_9
- * @arg @ref LL_RCC_PLLP_DIV_10
- * @arg @ref LL_RCC_PLLP_DIV_11
- * @arg @ref LL_RCC_PLLP_DIV_12
- * @arg @ref LL_RCC_PLLP_DIV_13
- * @arg @ref LL_RCC_PLLP_DIV_14
- * @arg @ref LL_RCC_PLLP_DIV_15
- * @arg @ref LL_RCC_PLLP_DIV_16
- * @arg @ref LL_RCC_PLLP_DIV_17
- * @arg @ref LL_RCC_PLLP_DIV_18
- * @arg @ref LL_RCC_PLLP_DIV_19
- * @arg @ref LL_RCC_PLLP_DIV_20
- * @arg @ref LL_RCC_PLLP_DIV_21
- * @arg @ref LL_RCC_PLLP_DIV_22
- * @arg @ref LL_RCC_PLLP_DIV_23
- * @arg @ref LL_RCC_PLLP_DIV_24
- * @arg @ref LL_RCC_PLLP_DIV_25
- * @arg @ref LL_RCC_PLLP_DIV_26
- * @arg @ref LL_RCC_PLLP_DIV_27
- * @arg @ref LL_RCC_PLLP_DIV_28
- * @arg @ref LL_RCC_PLLP_DIV_29
- * @arg @ref LL_RCC_PLLP_DIV_30
- * @arg @ref LL_RCC_PLLP_DIV_31
- * @retval PLL clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLCLK_SAI_FREQ(__INPUTFREQ__, __PLLM__, __PLLN__, __PLLP__) ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) * (__PLLN__) / \
- ((__PLLP__) >> RCC_PLLCFGR_PLLPDIV_Pos))
- #else
- /**
- * @brief Helper macro to calculate the PLLCLK frequency used on SAI domain
- * @note ex: @ref __LL_RCC_CALC_PLLCLK_SAI_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLL_GetN (), @ref LL_RCC_PLL_GetP ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param __PLLN__ Between 8 and 86
- * @param __PLLP__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLP_DIV_7
- * @arg @ref LL_RCC_PLLP_DIV_17
- * @retval PLL clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLCLK_SAI_FREQ(__INPUTFREQ__, __PLLM__, __PLLN__, __PLLP__) ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) * (__PLLN__) / \
- (((__PLLP__) == LL_RCC_PLLP_DIV_7) ? 7U : 17U))
- #endif /* RCC_PLLP_DIV_2_31_SUPPORT */
- #endif /* RCC_PLLSAI1_SUPPORT */
- /**
- * @brief Helper macro to calculate the PLLCLK frequency used on 48M domain
- * @note ex: @ref __LL_RCC_CALC_PLLCLK_48M_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLL_GetN (), @ref LL_RCC_PLL_GetQ ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @arg @ref LL_RCC_PLLM_DIV_9 (*)
- * @arg @ref LL_RCC_PLLM_DIV_10 (*)
- * @arg @ref LL_RCC_PLLM_DIV_11 (*)
- * @arg @ref LL_RCC_PLLM_DIV_12 (*)
- * @arg @ref LL_RCC_PLLM_DIV_13 (*)
- * @arg @ref LL_RCC_PLLM_DIV_14 (*)
- * @arg @ref LL_RCC_PLLM_DIV_15 (*)
- * @arg @ref LL_RCC_PLLM_DIV_16 (*)
- *
- * (*) value not defined in all devices.
- * @param __PLLN__ Between 8 and 86 or 127 depending on devices
- * @param __PLLQ__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLQ_DIV_2
- * @arg @ref LL_RCC_PLLQ_DIV_4
- * @arg @ref LL_RCC_PLLQ_DIV_6
- * @arg @ref LL_RCC_PLLQ_DIV_8
- * @retval PLL clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLCLK_48M_FREQ(__INPUTFREQ__, __PLLM__, __PLLN__, __PLLQ__) ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) * (__PLLN__) / \
- ((((__PLLQ__) >> RCC_PLLCFGR_PLLQ_Pos) + 1U) << 1U))
- #if defined(RCC_PLLSAI1_SUPPORT)
- #if defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT) && defined(RCC_PLLSAI1P_DIV_2_31_SUPPORT)
- /**
- * @brief Helper macro to calculate the PLLSAI1 frequency used for SAI domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI1_SAI_FREQ (HSE_VALUE,@ref LL_RCC_PLLSAI1_GetDivider (),
- * @ref LL_RCC_PLLSAI1_GetN (), @ref LL_RCC_PLLSAI1_GetP ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLSAI1M__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1M_DIV_1
- * @arg @ref LL_RCC_PLLSAI1M_DIV_2
- * @arg @ref LL_RCC_PLLSAI1M_DIV_3
- * @arg @ref LL_RCC_PLLSAI1M_DIV_4
- * @arg @ref LL_RCC_PLLSAI1M_DIV_5
- * @arg @ref LL_RCC_PLLSAI1M_DIV_6
- * @arg @ref LL_RCC_PLLSAI1M_DIV_7
- * @arg @ref LL_RCC_PLLSAI1M_DIV_8
- * @arg @ref LL_RCC_PLLSAI1M_DIV_9
- * @arg @ref LL_RCC_PLLSAI1M_DIV_10
- * @arg @ref LL_RCC_PLLSAI1M_DIV_11
- * @arg @ref LL_RCC_PLLSAI1M_DIV_12
- * @arg @ref LL_RCC_PLLSAI1M_DIV_13
- * @arg @ref LL_RCC_PLLSAI1M_DIV_14
- * @arg @ref LL_RCC_PLLSAI1M_DIV_15
- * @arg @ref LL_RCC_PLLSAI1M_DIV_16
- * @param __PLLSAI1N__ Between 8 and 86 or 127 depending on devices
- * @param __PLLSAI1P__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1P_DIV_2
- * @arg @ref LL_RCC_PLLSAI1P_DIV_3
- * @arg @ref LL_RCC_PLLSAI1P_DIV_4
- * @arg @ref LL_RCC_PLLSAI1P_DIV_5
- * @arg @ref LL_RCC_PLLSAI1P_DIV_6
- * @arg @ref LL_RCC_PLLSAI1P_DIV_7
- * @arg @ref LL_RCC_PLLSAI1P_DIV_8
- * @arg @ref LL_RCC_PLLSAI1P_DIV_9
- * @arg @ref LL_RCC_PLLSAI1P_DIV_10
- * @arg @ref LL_RCC_PLLSAI1P_DIV_11
- * @arg @ref LL_RCC_PLLSAI1P_DIV_12
- * @arg @ref LL_RCC_PLLSAI1P_DIV_13
- * @arg @ref LL_RCC_PLLSAI1P_DIV_14
- * @arg @ref LL_RCC_PLLSAI1P_DIV_15
- * @arg @ref LL_RCC_PLLSAI1P_DIV_16
- * @arg @ref LL_RCC_PLLSAI1P_DIV_17
- * @arg @ref LL_RCC_PLLSAI1P_DIV_18
- * @arg @ref LL_RCC_PLLSAI1P_DIV_19
- * @arg @ref LL_RCC_PLLSAI1P_DIV_20
- * @arg @ref LL_RCC_PLLSAI1P_DIV_21
- * @arg @ref LL_RCC_PLLSAI1P_DIV_22
- * @arg @ref LL_RCC_PLLSAI1P_DIV_23
- * @arg @ref LL_RCC_PLLSAI1P_DIV_24
- * @arg @ref LL_RCC_PLLSAI1P_DIV_25
- * @arg @ref LL_RCC_PLLSAI1P_DIV_26
- * @arg @ref LL_RCC_PLLSAI1P_DIV_27
- * @arg @ref LL_RCC_PLLSAI1P_DIV_28
- * @arg @ref LL_RCC_PLLSAI1P_DIV_29
- * @arg @ref LL_RCC_PLLSAI1P_DIV_30
- * @arg @ref LL_RCC_PLLSAI1P_DIV_31
- * @retval PLLSAI1 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI1_SAI_FREQ(__INPUTFREQ__, __PLLSAI1M__, __PLLSAI1N__, __PLLSAI1P__) \
- ((__INPUTFREQ__) / ((((__PLLSAI1M__) >> RCC_PLLSAI1CFGR_PLLSAI1M_Pos) + 1U)) * (__PLLSAI1N__) / \
- ((__PLLSAI1P__) >> RCC_PLLSAI1CFGR_PLLSAI1PDIV_Pos))
- #elif defined(RCC_PLLSAI1P_DIV_2_31_SUPPORT)
- /**
- * @brief Helper macro to calculate the PLLSAI1 frequency used for SAI domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI1_SAI_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLLSAI1_GetN (), @ref LL_RCC_PLLSAI1_GetP ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param __PLLSAI1N__ Between 8 and 86 or 127 depending on devices
- * @param __PLLSAI1P__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1P_DIV_2
- * @arg @ref LL_RCC_PLLSAI1P_DIV_3
- * @arg @ref LL_RCC_PLLSAI1P_DIV_4
- * @arg @ref LL_RCC_PLLSAI1P_DIV_5
- * @arg @ref LL_RCC_PLLSAI1P_DIV_6
- * @arg @ref LL_RCC_PLLSAI1P_DIV_7
- * @arg @ref LL_RCC_PLLSAI1P_DIV_8
- * @arg @ref LL_RCC_PLLSAI1P_DIV_9
- * @arg @ref LL_RCC_PLLSAI1P_DIV_10
- * @arg @ref LL_RCC_PLLSAI1P_DIV_11
- * @arg @ref LL_RCC_PLLSAI1P_DIV_12
- * @arg @ref LL_RCC_PLLSAI1P_DIV_13
- * @arg @ref LL_RCC_PLLSAI1P_DIV_14
- * @arg @ref LL_RCC_PLLSAI1P_DIV_15
- * @arg @ref LL_RCC_PLLSAI1P_DIV_16
- * @arg @ref LL_RCC_PLLSAI1P_DIV_17
- * @arg @ref LL_RCC_PLLSAI1P_DIV_18
- * @arg @ref LL_RCC_PLLSAI1P_DIV_19
- * @arg @ref LL_RCC_PLLSAI1P_DIV_20
- * @arg @ref LL_RCC_PLLSAI1P_DIV_21
- * @arg @ref LL_RCC_PLLSAI1P_DIV_22
- * @arg @ref LL_RCC_PLLSAI1P_DIV_23
- * @arg @ref LL_RCC_PLLSAI1P_DIV_24
- * @arg @ref LL_RCC_PLLSAI1P_DIV_25
- * @arg @ref LL_RCC_PLLSAI1P_DIV_26
- * @arg @ref LL_RCC_PLLSAI1P_DIV_27
- * @arg @ref LL_RCC_PLLSAI1P_DIV_28
- * @arg @ref LL_RCC_PLLSAI1P_DIV_29
- * @arg @ref LL_RCC_PLLSAI1P_DIV_30
- * @arg @ref LL_RCC_PLLSAI1P_DIV_31
- * @retval PLLSAI1 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI1_SAI_FREQ(__INPUTFREQ__, __PLLM__, __PLLSAI1N__, __PLLSAI1P__) \
- ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) * (__PLLSAI1N__) / \
- ((__PLLSAI1P__) >> RCC_PLLSAI1CFGR_PLLSAI1PDIV_Pos))
- #else
- /**
- * @brief Helper macro to calculate the PLLSAI1 frequency used for SAI domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI1_SAI_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLLSAI1_GetN (), @ref LL_RCC_PLLSAI1_GetP ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param __PLLSAI1N__ Between 8 and 86
- * @param __PLLSAI1P__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1P_DIV_7
- * @arg @ref LL_RCC_PLLSAI1P_DIV_17
- * @retval PLLSAI1 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI1_SAI_FREQ(__INPUTFREQ__, __PLLM__, __PLLSAI1N__, __PLLSAI1P__) \
- ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) * (__PLLSAI1N__) / \
- (((__PLLSAI1P__) == LL_RCC_PLLSAI1P_DIV_7) ? 7U : 17U))
- #endif /* RCC_PLLSAI1P_DIV_2_31_SUPPORT */
- #if defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT)
- /**
- * @brief Helper macro to calculate the PLLSAI1 frequency used on 48M domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI1_48M_FREQ (HSE_VALUE,@ref LL_RCC_PLLSAI1_GetDivider (),
- * @ref LL_RCC_PLLSAI1_GetN (), @ref LL_RCC_PLLSAI1_GetQ ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLSAI1M__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1M_DIV_1
- * @arg @ref LL_RCC_PLLSAI1M_DIV_2
- * @arg @ref LL_RCC_PLLSAI1M_DIV_3
- * @arg @ref LL_RCC_PLLSAI1M_DIV_4
- * @arg @ref LL_RCC_PLLSAI1M_DIV_5
- * @arg @ref LL_RCC_PLLSAI1M_DIV_6
- * @arg @ref LL_RCC_PLLSAI1M_DIV_7
- * @arg @ref LL_RCC_PLLSAI1M_DIV_8
- * @arg @ref LL_RCC_PLLSAI1M_DIV_9
- * @arg @ref LL_RCC_PLLSAI1M_DIV_10
- * @arg @ref LL_RCC_PLLSAI1M_DIV_11
- * @arg @ref LL_RCC_PLLSAI1M_DIV_12
- * @arg @ref LL_RCC_PLLSAI1M_DIV_13
- * @arg @ref LL_RCC_PLLSAI1M_DIV_14
- * @arg @ref LL_RCC_PLLSAI1M_DIV_15
- * @arg @ref LL_RCC_PLLSAI1M_DIV_16
- * @param __PLLSAI1N__ Between 8 and 86 or 127 depending on devices
- * @param __PLLSAI1Q__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_2
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_4
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_6
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_8
- * @retval PLLSAI1 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI1_48M_FREQ(__INPUTFREQ__, __PLLSAI1M__, __PLLSAI1N__, __PLLSAI1Q__) \
- ((__INPUTFREQ__) / ((((__PLLSAI1M__) >> RCC_PLLSAI1CFGR_PLLSAI1M_Pos) + 1U)) * (__PLLSAI1N__) / \
- ((((__PLLSAI1Q__) >> RCC_PLLSAI1CFGR_PLLSAI1Q_Pos) + 1U) << 1U))
- #else
- /**
- * @brief Helper macro to calculate the PLLSAI1 frequency used on 48M domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI1_48M_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLLSAI1_GetN (), @ref LL_RCC_PLLSAI1_GetQ ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param __PLLSAI1N__ Between 8 and 86
- * @param __PLLSAI1Q__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_2
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_4
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_6
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_8
- * @retval PLLSAI1 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI1_48M_FREQ(__INPUTFREQ__, __PLLM__, __PLLSAI1N__, __PLLSAI1Q__) \
- ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) * (__PLLSAI1N__) / \
- ((((__PLLSAI1Q__) >> RCC_PLLSAI1CFGR_PLLSAI1Q_Pos) + 1U) << 1U))
- #endif /* RCC_PLLSAI1M_DIV_1_16_SUPPORT */
- #if defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT)
- /**
- * @brief Helper macro to calculate the PLLSAI1 frequency used on ADC domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI1_ADC_FREQ (HSE_VALUE,@ref LL_RCC_PLLSAI1_GetDivider (),
- * @ref LL_RCC_PLLSAI1_GetN (), @ref LL_RCC_PLLSAI1_GetR ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLSAI1M__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1M_DIV_1
- * @arg @ref LL_RCC_PLLSAI1M_DIV_2
- * @arg @ref LL_RCC_PLLSAI1M_DIV_3
- * @arg @ref LL_RCC_PLLSAI1M_DIV_4
- * @arg @ref LL_RCC_PLLSAI1M_DIV_5
- * @arg @ref LL_RCC_PLLSAI1M_DIV_6
- * @arg @ref LL_RCC_PLLSAI1M_DIV_7
- * @arg @ref LL_RCC_PLLSAI1M_DIV_8
- * @arg @ref LL_RCC_PLLSAI1M_DIV_9
- * @arg @ref LL_RCC_PLLSAI1M_DIV_10
- * @arg @ref LL_RCC_PLLSAI1M_DIV_11
- * @arg @ref LL_RCC_PLLSAI1M_DIV_12
- * @arg @ref LL_RCC_PLLSAI1M_DIV_13
- * @arg @ref LL_RCC_PLLSAI1M_DIV_14
- * @arg @ref LL_RCC_PLLSAI1M_DIV_15
- * @arg @ref LL_RCC_PLLSAI1M_DIV_16
- * @param __PLLSAI1N__ Between 8 and 86 or 127 depending on devices
- * @param __PLLSAI1R__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1R_DIV_2
- * @arg @ref LL_RCC_PLLSAI1R_DIV_4
- * @arg @ref LL_RCC_PLLSAI1R_DIV_6
- * @arg @ref LL_RCC_PLLSAI1R_DIV_8
- * @retval PLLSAI1 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI1_ADC_FREQ(__INPUTFREQ__, __PLLSAI1M__, __PLLSAI1N__, __PLLSAI1R__) \
- ((__INPUTFREQ__) / ((((__PLLSAI1M__) >> RCC_PLLSAI1CFGR_PLLSAI1M_Pos) + 1U)) * (__PLLSAI1N__) / \
- ((((__PLLSAI1R__) >> RCC_PLLSAI1CFGR_PLLSAI1R_Pos) + 1U) << 1U))
- #else
- /**
- * @brief Helper macro to calculate the PLLSAI1 frequency used on ADC domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI1_ADC_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLLSAI1_GetN (), @ref LL_RCC_PLLSAI1_GetR ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param __PLLSAI1N__ Between 8 and 86
- * @param __PLLSAI1R__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1R_DIV_2
- * @arg @ref LL_RCC_PLLSAI1R_DIV_4
- * @arg @ref LL_RCC_PLLSAI1R_DIV_6
- * @arg @ref LL_RCC_PLLSAI1R_DIV_8
- * @retval PLLSAI1 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI1_ADC_FREQ(__INPUTFREQ__, __PLLM__, __PLLSAI1N__, __PLLSAI1R__) \
- ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) * (__PLLSAI1N__) / \
- ((((__PLLSAI1R__) >> RCC_PLLSAI1CFGR_PLLSAI1R_Pos) + 1U) << 1U))
- #endif /* RCC_PLLSAI1M_DIV_1_16_SUPPORT */
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2M_DIV_1_16_SUPPORT) && defined(RCC_PLLSAI2P_DIV_2_31_SUPPORT)
- /**
- * @brief Helper macro to calculate the PLLSAI2 frequency used for SAI domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI2_SAI_FREQ (HSE_VALUE,@ref LL_RCC_PLLSAI2_GetDivider (),
- * @ref LL_RCC_PLLSAI2_GetN (), @ref LL_RCC_PLLSAI2_GetP ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLSAI2M__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2M_DIV_1
- * @arg @ref LL_RCC_PLLSAI2M_DIV_2
- * @arg @ref LL_RCC_PLLSAI2M_DIV_3
- * @arg @ref LL_RCC_PLLSAI2M_DIV_4
- * @arg @ref LL_RCC_PLLSAI2M_DIV_5
- * @arg @ref LL_RCC_PLLSAI2M_DIV_6
- * @arg @ref LL_RCC_PLLSAI2M_DIV_7
- * @arg @ref LL_RCC_PLLSAI2M_DIV_8
- * @arg @ref LL_RCC_PLLSAI2M_DIV_9
- * @arg @ref LL_RCC_PLLSAI2M_DIV_10
- * @arg @ref LL_RCC_PLLSAI2M_DIV_11
- * @arg @ref LL_RCC_PLLSAI2M_DIV_12
- * @arg @ref LL_RCC_PLLSAI2M_DIV_13
- * @arg @ref LL_RCC_PLLSAI2M_DIV_14
- * @arg @ref LL_RCC_PLLSAI2M_DIV_15
- * @arg @ref LL_RCC_PLLSAI2M_DIV_16
- * @param __PLLSAI2N__ Between 8 and 86 or 127 depending on devices
- * @param __PLLSAI2P__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2P_DIV_2
- * @arg @ref LL_RCC_PLLSAI2P_DIV_3
- * @arg @ref LL_RCC_PLLSAI2P_DIV_4
- * @arg @ref LL_RCC_PLLSAI2P_DIV_5
- * @arg @ref LL_RCC_PLLSAI2P_DIV_6
- * @arg @ref LL_RCC_PLLSAI2P_DIV_7
- * @arg @ref LL_RCC_PLLSAI2P_DIV_8
- * @arg @ref LL_RCC_PLLSAI2P_DIV_9
- * @arg @ref LL_RCC_PLLSAI2P_DIV_10
- * @arg @ref LL_RCC_PLLSAI2P_DIV_11
- * @arg @ref LL_RCC_PLLSAI2P_DIV_12
- * @arg @ref LL_RCC_PLLSAI2P_DIV_13
- * @arg @ref LL_RCC_PLLSAI2P_DIV_14
- * @arg @ref LL_RCC_PLLSAI2P_DIV_15
- * @arg @ref LL_RCC_PLLSAI2P_DIV_16
- * @arg @ref LL_RCC_PLLSAI2P_DIV_17
- * @arg @ref LL_RCC_PLLSAI2P_DIV_18
- * @arg @ref LL_RCC_PLLSAI2P_DIV_19
- * @arg @ref LL_RCC_PLLSAI2P_DIV_20
- * @arg @ref LL_RCC_PLLSAI2P_DIV_21
- * @arg @ref LL_RCC_PLLSAI2P_DIV_22
- * @arg @ref LL_RCC_PLLSAI2P_DIV_23
- * @arg @ref LL_RCC_PLLSAI2P_DIV_24
- * @arg @ref LL_RCC_PLLSAI2P_DIV_25
- * @arg @ref LL_RCC_PLLSAI2P_DIV_26
- * @arg @ref LL_RCC_PLLSAI2P_DIV_27
- * @arg @ref LL_RCC_PLLSAI2P_DIV_28
- * @arg @ref LL_RCC_PLLSAI2P_DIV_29
- * @arg @ref LL_RCC_PLLSAI2P_DIV_30
- * @arg @ref LL_RCC_PLLSAI2P_DIV_31
- * @retval PLLSAI2 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI2_SAI_FREQ(__INPUTFREQ__, __PLLSAI2M__, __PLLSAI2N__, __PLLSAI2P__) \
- ((__INPUTFREQ__) / ((((__PLLSAI2M__) >> RCC_PLLSAI2CFGR_PLLSAI2M_Pos) + 1U)) * (__PLLSAI2N__) / \
- ((__PLLSAI2P__) >> RCC_PLLSAI2CFGR_PLLSAI2PDIV_Pos))
- #elif defined(RCC_PLLSAI2P_DIV_2_31_SUPPORT)
- /**
- * @brief Helper macro to calculate the PLLSAI2 frequency used for SAI domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI2_SAI_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLLSAI2_GetN (), @ref LL_RCC_PLLSAI2_GetP ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param __PLLSAI2N__ Between 8 and 86 or 127 depending on devices
- * @param __PLLSAI2P__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2P_DIV_2
- * @arg @ref LL_RCC_PLLSAI2P_DIV_3
- * @arg @ref LL_RCC_PLLSAI2P_DIV_4
- * @arg @ref LL_RCC_PLLSAI2P_DIV_5
- * @arg @ref LL_RCC_PLLSAI2P_DIV_6
- * @arg @ref LL_RCC_PLLSAI2P_DIV_7
- * @arg @ref LL_RCC_PLLSAI2P_DIV_8
- * @arg @ref LL_RCC_PLLSAI2P_DIV_9
- * @arg @ref LL_RCC_PLLSAI2P_DIV_10
- * @arg @ref LL_RCC_PLLSAI2P_DIV_11
- * @arg @ref LL_RCC_PLLSAI2P_DIV_12
- * @arg @ref LL_RCC_PLLSAI2P_DIV_13
- * @arg @ref LL_RCC_PLLSAI2P_DIV_14
- * @arg @ref LL_RCC_PLLSAI2P_DIV_15
- * @arg @ref LL_RCC_PLLSAI2P_DIV_16
- * @arg @ref LL_RCC_PLLSAI2P_DIV_17
- * @arg @ref LL_RCC_PLLSAI2P_DIV_18
- * @arg @ref LL_RCC_PLLSAI2P_DIV_19
- * @arg @ref LL_RCC_PLLSAI2P_DIV_20
- * @arg @ref LL_RCC_PLLSAI2P_DIV_21
- * @arg @ref LL_RCC_PLLSAI2P_DIV_22
- * @arg @ref LL_RCC_PLLSAI2P_DIV_23
- * @arg @ref LL_RCC_PLLSAI2P_DIV_24
- * @arg @ref LL_RCC_PLLSAI2P_DIV_25
- * @arg @ref LL_RCC_PLLSAI2P_DIV_26
- * @arg @ref LL_RCC_PLLSAI2P_DIV_27
- * @arg @ref LL_RCC_PLLSAI2P_DIV_28
- * @arg @ref LL_RCC_PLLSAI2P_DIV_29
- * @arg @ref LL_RCC_PLLSAI2P_DIV_30
- * @arg @ref LL_RCC_PLLSAI2P_DIV_31
- * @retval PLLSAI2 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI2_SAI_FREQ(__INPUTFREQ__, __PLLM__, __PLLSAI2N__, __PLLSAI2P__) \
- ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) * (__PLLSAI2N__) / \
- ((__PLLSAI2P__) >> RCC_PLLSAI2CFGR_PLLSAI2PDIV_Pos))
- #else
- /**
- * @brief Helper macro to calculate the PLLSAI2 frequency used for SAI domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI2_SAI_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLLSAI2_GetN (), @ref LL_RCC_PLLSAI2_GetP ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param __PLLSAI2N__ Between 8 and 86
- * @param __PLLSAI2P__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2P_DIV_7
- * @arg @ref LL_RCC_PLLSAI2P_DIV_17
- * @retval PLLSAI2 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI2_SAI_FREQ(__INPUTFREQ__, __PLLM__, __PLLSAI2N__, __PLLSAI2P__) \
- ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1)) * (__PLLSAI2N__) / \
- (((__PLLSAI2P__) == LL_RCC_PLLSAI2P_DIV_7) ? 7U : 17U))
- #endif /* RCC_PLLSAI2P_DIV_2_31_SUPPORT */
- #if defined(LTDC)
- /**
- * @brief Helper macro to calculate the PLLSAI2 frequency used for LTDC domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI2_LTDC_FREQ (HSE_VALUE,@ref LL_RCC_PLLSAI2_GetDivider (),
- * @ref LL_RCC_PLLSAI2_GetN (), @ref LL_RCC_PLLSAI2_GetR (), @ref LL_RCC_PLLSAI2_GetDIVR ());
- * @param __INPUTFREQ__ PLL Input frequency (based on HSE/HSI/MSI)
- * @param __PLLSAI2M__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2M_DIV_1
- * @arg @ref LL_RCC_PLLSAI2M_DIV_2
- * @arg @ref LL_RCC_PLLSAI2M_DIV_3
- * @arg @ref LL_RCC_PLLSAI2M_DIV_4
- * @arg @ref LL_RCC_PLLSAI2M_DIV_5
- * @arg @ref LL_RCC_PLLSAI2M_DIV_6
- * @arg @ref LL_RCC_PLLSAI2M_DIV_7
- * @arg @ref LL_RCC_PLLSAI2M_DIV_8
- * @arg @ref LL_RCC_PLLSAI2M_DIV_9
- * @arg @ref LL_RCC_PLLSAI2M_DIV_10
- * @arg @ref LL_RCC_PLLSAI2M_DIV_11
- * @arg @ref LL_RCC_PLLSAI2M_DIV_12
- * @arg @ref LL_RCC_PLLSAI2M_DIV_13
- * @arg @ref LL_RCC_PLLSAI2M_DIV_14
- * @arg @ref LL_RCC_PLLSAI2M_DIV_15
- * @arg @ref LL_RCC_PLLSAI2M_DIV_16
- * @param __PLLSAI2N__ Between 8 and 127
- * @param __PLLSAI2R__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2R_DIV_2
- * @arg @ref LL_RCC_PLLSAI2R_DIV_4
- * @arg @ref LL_RCC_PLLSAI2R_DIV_6
- * @arg @ref LL_RCC_PLLSAI2R_DIV_8
- * @param __PLLSAI2DIVR__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_2
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_4
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_8
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_16
- * @retval PLLSAI2 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI2_LTDC_FREQ(__INPUTFREQ__, __PLLSAI2M__, __PLLSAI2N__, __PLLSAI2R__, __PLLSAI2DIVR__) \
- (((__INPUTFREQ__) / (((__PLLSAI2M__)>> RCC_PLLSAI2CFGR_PLLSAI2M_Pos) + 1U)) * (__PLLSAI2N__) / \
- (((((__PLLSAI2R__) >> RCC_PLLSAI2CFGR_PLLSAI2R_Pos ) + 1U) << 1U) * (2UL << ((__PLLSAI2DIVR__) >> RCC_CCIPR2_PLLSAI2DIVR_Pos))))
- #elif defined(RCC_PLLSAI2_SUPPORT)
- /**
- * @brief Helper macro to calculate the PLLSAI2 frequency used on ADC domain
- * @note ex: @ref __LL_RCC_CALC_PLLSAI2_ADC_FREQ (HSE_VALUE,@ref LL_RCC_PLL_GetDivider (),
- * @ref LL_RCC_PLLSAI2_GetN (), @ref LL_RCC_PLLSAI2_GetR ());
- * @param __INPUTFREQ__ PLL Input frequency (based on MSI/HSE/HSI)
- * @param __PLLM__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param __PLLSAI2N__ Between 8 and 86
- * @param __PLLSAI2R__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2R_DIV_2
- * @arg @ref LL_RCC_PLLSAI2R_DIV_4
- * @arg @ref LL_RCC_PLLSAI2R_DIV_6
- * @arg @ref LL_RCC_PLLSAI2R_DIV_8
- * @retval PLLSAI2 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI2_ADC_FREQ(__INPUTFREQ__, __PLLM__, __PLLSAI2N__, __PLLSAI2R__) \
- ((__INPUTFREQ__) / ((((__PLLM__)>> RCC_PLLCFGR_PLLM_Pos) + 1U)) * (__PLLSAI2N__) / \
- ((((__PLLSAI2R__) >> RCC_PLLSAI2CFGR_PLLSAI2R_Pos ) + 1U) << 1U))
- #endif /* LTDC */
- #if defined(DSI)
- /**
- * @brief Helper macro to calculate the PLLDSICLK frequency used on DSI
- * @note ex: @ref __LL_RCC_CALC_PLLSAI2_DSI_FREQ (HSE_VALUE,@ref LL_RCC_PLLSAI2_GetDivider (),
- * @ref LL_RCC_PLLSAI2_GetN (), @ref LL_RCC_PLLSAI2_GetQ ());
- * @param __INPUTFREQ__ PLL Input frequency (based on HSE/HSI/MSI)
- * @param __PLLSAI2M__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2M_DIV_1
- * @arg @ref LL_RCC_PLLSAI2M_DIV_2
- * @arg @ref LL_RCC_PLLSAI2M_DIV_3
- * @arg @ref LL_RCC_PLLSAI2M_DIV_4
- * @arg @ref LL_RCC_PLLSAI2M_DIV_5
- * @arg @ref LL_RCC_PLLSAI2M_DIV_6
- * @arg @ref LL_RCC_PLLSAI2M_DIV_7
- * @arg @ref LL_RCC_PLLSAI2M_DIV_8
- * @arg @ref LL_RCC_PLLSAI2M_DIV_9
- * @arg @ref LL_RCC_PLLSAI2M_DIV_10
- * @arg @ref LL_RCC_PLLSAI2M_DIV_11
- * @arg @ref LL_RCC_PLLSAI2M_DIV_12
- * @arg @ref LL_RCC_PLLSAI2M_DIV_13
- * @arg @ref LL_RCC_PLLSAI2M_DIV_14
- * @arg @ref LL_RCC_PLLSAI2M_DIV_15
- * @arg @ref LL_RCC_PLLSAI2M_DIV_16
- * @param __PLLSAI2N__ Between 8 and 127
- * @param __PLLSAI2Q__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_2
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_4
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_6
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_8
- * @retval PLL clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PLLSAI2_DSI_FREQ(__INPUTFREQ__, __PLLSAI2M__, __PLLSAI2N__, __PLLSAI2Q__) \
- ((__INPUTFREQ__) / ((((__PLLSAI2M__) >> RCC_PLLSAI2CFGR_PLLSAI2M_Pos) + 1U)) * (__PLLSAI2N__) / \
- ((((__PLLSAI2Q__) >> RCC_PLLSAI2CFGR_PLLSAI2Q_Pos) + 1U) << 1U))
- #endif /* DSI */
- /**
- * @brief Helper macro to calculate the HCLK frequency
- * @param __SYSCLKFREQ__ SYSCLK frequency (based on MSI/HSE/HSI/PLLCLK)
- * @param __AHBPRESCALER__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_SYSCLK_DIV_1
- * @arg @ref LL_RCC_SYSCLK_DIV_2
- * @arg @ref LL_RCC_SYSCLK_DIV_4
- * @arg @ref LL_RCC_SYSCLK_DIV_8
- * @arg @ref LL_RCC_SYSCLK_DIV_16
- * @arg @ref LL_RCC_SYSCLK_DIV_64
- * @arg @ref LL_RCC_SYSCLK_DIV_128
- * @arg @ref LL_RCC_SYSCLK_DIV_256
- * @arg @ref LL_RCC_SYSCLK_DIV_512
- * @retval HCLK clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_HCLK_FREQ(__SYSCLKFREQ__, __AHBPRESCALER__) ((__SYSCLKFREQ__) >> AHBPrescTable[((__AHBPRESCALER__) & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos])
- /**
- * @brief Helper macro to calculate the PCLK1 frequency (ABP1)
- * @param __HCLKFREQ__ HCLK frequency
- * @param __APB1PRESCALER__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_APB1_DIV_1
- * @arg @ref LL_RCC_APB1_DIV_2
- * @arg @ref LL_RCC_APB1_DIV_4
- * @arg @ref LL_RCC_APB1_DIV_8
- * @arg @ref LL_RCC_APB1_DIV_16
- * @retval PCLK1 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PCLK1_FREQ(__HCLKFREQ__, __APB1PRESCALER__) ((__HCLKFREQ__) >> APBPrescTable[(__APB1PRESCALER__) >> RCC_CFGR_PPRE1_Pos])
- /**
- * @brief Helper macro to calculate the PCLK2 frequency (ABP2)
- * @param __HCLKFREQ__ HCLK frequency
- * @param __APB2PRESCALER__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_APB2_DIV_1
- * @arg @ref LL_RCC_APB2_DIV_2
- * @arg @ref LL_RCC_APB2_DIV_4
- * @arg @ref LL_RCC_APB2_DIV_8
- * @arg @ref LL_RCC_APB2_DIV_16
- * @retval PCLK2 clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_PCLK2_FREQ(__HCLKFREQ__, __APB2PRESCALER__) ((__HCLKFREQ__) >> APBPrescTable[(__APB2PRESCALER__) >> RCC_CFGR_PPRE2_Pos])
- /**
- * @brief Helper macro to calculate the MSI frequency (in Hz)
- * @note __MSISEL__ can be retrieved thanks to function LL_RCC_MSI_IsEnabledRangeSelect()
- * @note if __MSISEL__ is equal to LL_RCC_MSIRANGESEL_STANDBY,
- * __MSIRANGE__can be retrieved by LL_RCC_MSI_GetRangeAfterStandby()
- * else by LL_RCC_MSI_GetRange()
- * ex: __LL_RCC_CALC_MSI_FREQ(LL_RCC_MSI_IsEnabledRangeSelect(),
- * (LL_RCC_MSI_IsEnabledRangeSelect()?
- * LL_RCC_MSI_GetRange():
- * LL_RCC_MSI_GetRangeAfterStandby()))
- * @param __MSISEL__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_MSIRANGESEL_STANDBY
- * @arg @ref LL_RCC_MSIRANGESEL_RUN
- * @param __MSIRANGE__ This parameter can be one of the following values:
- * @arg @ref LL_RCC_MSIRANGE_0
- * @arg @ref LL_RCC_MSIRANGE_1
- * @arg @ref LL_RCC_MSIRANGE_2
- * @arg @ref LL_RCC_MSIRANGE_3
- * @arg @ref LL_RCC_MSIRANGE_4
- * @arg @ref LL_RCC_MSIRANGE_5
- * @arg @ref LL_RCC_MSIRANGE_6
- * @arg @ref LL_RCC_MSIRANGE_7
- * @arg @ref LL_RCC_MSIRANGE_8
- * @arg @ref LL_RCC_MSIRANGE_9
- * @arg @ref LL_RCC_MSIRANGE_10
- * @arg @ref LL_RCC_MSIRANGE_11
- * @arg @ref LL_RCC_MSISRANGE_4
- * @arg @ref LL_RCC_MSISRANGE_5
- * @arg @ref LL_RCC_MSISRANGE_6
- * @arg @ref LL_RCC_MSISRANGE_7
- * @retval MSI clock frequency (in Hz)
- */
- #define __LL_RCC_CALC_MSI_FREQ(__MSISEL__, __MSIRANGE__) (((__MSISEL__) == LL_RCC_MSIRANGESEL_STANDBY) ? \
- (MSIRangeTable[(__MSIRANGE__) >> 8U]) : \
- (MSIRangeTable[(__MSIRANGE__) >> 4U]))
- /**
- * @}
- */
- /**
- * @}
- */
- /* Exported functions --------------------------------------------------------*/
- /** @defgroup RCC_LL_Exported_Functions RCC Exported Functions
- * @{
- */
- /** @defgroup RCC_LL_EF_HSE HSE
- * @{
- */
- /**
- * @brief Enable the Clock Security System.
- * @rmtoll CR CSSON LL_RCC_HSE_EnableCSS
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSE_EnableCSS(void)
- {
- SET_BIT(RCC->CR, RCC_CR_CSSON);
- }
- /**
- * @brief Enable HSE external oscillator (HSE Bypass)
- * @rmtoll CR HSEBYP LL_RCC_HSE_EnableBypass
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSE_EnableBypass(void)
- {
- SET_BIT(RCC->CR, RCC_CR_HSEBYP);
- }
- /**
- * @brief Disable HSE external oscillator (HSE Bypass)
- * @rmtoll CR HSEBYP LL_RCC_HSE_DisableBypass
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSE_DisableBypass(void)
- {
- CLEAR_BIT(RCC->CR, RCC_CR_HSEBYP);
- }
- /**
- * @brief Enable HSE crystal oscillator (HSE ON)
- * @rmtoll CR HSEON LL_RCC_HSE_Enable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSE_Enable(void)
- {
- SET_BIT(RCC->CR, RCC_CR_HSEON);
- }
- /**
- * @brief Disable HSE crystal oscillator (HSE ON)
- * @rmtoll CR HSEON LL_RCC_HSE_Disable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSE_Disable(void)
- {
- CLEAR_BIT(RCC->CR, RCC_CR_HSEON);
- }
- /**
- * @brief Check if HSE oscillator Ready
- * @rmtoll CR HSERDY LL_RCC_HSE_IsReady
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_HSE_IsReady(void)
- {
- return ((READ_BIT(RCC->CR, RCC_CR_HSERDY) == RCC_CR_HSERDY) ? 1UL : 0UL);
- }
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_HSI HSI
- * @{
- */
- /**
- * @brief Enable HSI even in stop mode
- * @note HSI oscillator is forced ON even in Stop mode
- * @rmtoll CR HSIKERON LL_RCC_HSI_EnableInStopMode
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSI_EnableInStopMode(void)
- {
- SET_BIT(RCC->CR, RCC_CR_HSIKERON);
- }
- /**
- * @brief Disable HSI in stop mode
- * @rmtoll CR HSIKERON LL_RCC_HSI_DisableInStopMode
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSI_DisableInStopMode(void)
- {
- CLEAR_BIT(RCC->CR, RCC_CR_HSIKERON);
- }
- /**
- * @brief Check if HSI is enabled in stop mode
- * @rmtoll CR HSIKERON LL_RCC_HSI_IsEnabledInStopMode
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_HSI_IsEnabledInStopMode(void)
- {
- return ((READ_BIT(RCC->CR, RCC_CR_HSIKERON) == RCC_CR_HSIKERON) ? 1UL : 0UL);
- }
- /**
- * @brief Enable HSI oscillator
- * @rmtoll CR HSION LL_RCC_HSI_Enable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSI_Enable(void)
- {
- SET_BIT(RCC->CR, RCC_CR_HSION);
- }
- /**
- * @brief Disable HSI oscillator
- * @rmtoll CR HSION LL_RCC_HSI_Disable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSI_Disable(void)
- {
- CLEAR_BIT(RCC->CR, RCC_CR_HSION);
- }
- /**
- * @brief Check if HSI clock is ready
- * @rmtoll CR HSIRDY LL_RCC_HSI_IsReady
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_HSI_IsReady(void)
- {
- return ((READ_BIT(RCC->CR, RCC_CR_HSIRDY) == RCC_CR_HSIRDY) ? 1UL : 0UL);
- }
- /**
- * @brief Enable HSI Automatic from stop mode
- * @rmtoll CR HSIASFS LL_RCC_HSI_EnableAutoFromStop
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSI_EnableAutoFromStop(void)
- {
- SET_BIT(RCC->CR, RCC_CR_HSIASFS);
- }
- /**
- * @brief Disable HSI Automatic from stop mode
- * @rmtoll CR HSIASFS LL_RCC_HSI_DisableAutoFromStop
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSI_DisableAutoFromStop(void)
- {
- CLEAR_BIT(RCC->CR, RCC_CR_HSIASFS);
- }
- /**
- * @brief Get HSI Calibration value
- * @note When HSITRIM is written, HSICAL is updated with the sum of
- * HSITRIM and the factory trim value
- * @rmtoll ICSCR HSICAL LL_RCC_HSI_GetCalibration
- * @retval Between Min_Data = 0x00 and Max_Data = 0xFF
- */
- __STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibration(void)
- {
- return (uint32_t)(READ_BIT(RCC->ICSCR, RCC_ICSCR_HSICAL) >> RCC_ICSCR_HSICAL_Pos);
- }
- /**
- * @brief Set HSI Calibration trimming
- * @note user-programmable trimming value that is added to the HSICAL
- * @note Default value is 16 on STM32L43x/STM32L44x/STM32L47x/STM32L48x or 64 on other devices,
- * which, when added to the HSICAL value, should trim the HSI to 16 MHz +/- 1 %
- * @rmtoll ICSCR HSITRIM LL_RCC_HSI_SetCalibTrimming
- * @param Value Between Min_Data = 0 and Max_Data = 31 on STM32L43x/STM32L44x/STM32L47x/STM32L48x or
- * between Min_Data = 0 and Max_Data = 127 on other devices
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSI_SetCalibTrimming(uint32_t Value)
- {
- MODIFY_REG(RCC->ICSCR, RCC_ICSCR_HSITRIM, Value << RCC_ICSCR_HSITRIM_Pos);
- }
- /**
- * @brief Get HSI Calibration trimming
- * @rmtoll ICSCR HSITRIM LL_RCC_HSI_GetCalibTrimming
- * @retval Between Min_Data = 0 and Max_Data = 31 on STM32L43x/STM32L44x/STM32L47x/STM32L48x or
- * between Min_Data = 0 and Max_Data = 127 on other devices
- */
- __STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibTrimming(void)
- {
- return (uint32_t)(READ_BIT(RCC->ICSCR, RCC_ICSCR_HSITRIM) >> RCC_ICSCR_HSITRIM_Pos);
- }
- /**
- * @}
- */
- #if defined(RCC_HSI48_SUPPORT)
- /** @defgroup RCC_LL_EF_HSI48 HSI48
- * @{
- */
- /**
- * @brief Enable HSI48
- * @rmtoll CRRCR HSI48ON LL_RCC_HSI48_Enable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSI48_Enable(void)
- {
- SET_BIT(RCC->CRRCR, RCC_CRRCR_HSI48ON);
- }
- /**
- * @brief Disable HSI48
- * @rmtoll CRRCR HSI48ON LL_RCC_HSI48_Disable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_HSI48_Disable(void)
- {
- CLEAR_BIT(RCC->CRRCR, RCC_CRRCR_HSI48ON);
- }
- /**
- * @brief Check if HSI48 oscillator Ready
- * @rmtoll CRRCR HSI48RDY LL_RCC_HSI48_IsReady
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_HSI48_IsReady(void)
- {
- return ((READ_BIT(RCC->CRRCR, RCC_CRRCR_HSI48RDY) == RCC_CRRCR_HSI48RDY) ? 1UL : 0UL);
- }
- /**
- * @brief Get HSI48 Calibration value
- * @rmtoll CRRCR HSI48CAL LL_RCC_HSI48_GetCalibration
- * @retval Between Min_Data = 0x00 and Max_Data = 0x1FF
- */
- __STATIC_INLINE uint32_t LL_RCC_HSI48_GetCalibration(void)
- {
- return (uint32_t)(READ_BIT(RCC->CRRCR, RCC_CRRCR_HSI48CAL) >> RCC_CRRCR_HSI48CAL_Pos);
- }
- /**
- * @}
- */
- #endif /* RCC_HSI48_SUPPORT */
- /** @defgroup RCC_LL_EF_LSE LSE
- * @{
- */
- /**
- * @brief Enable Low Speed External (LSE) crystal.
- * @rmtoll BDCR LSEON LL_RCC_LSE_Enable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSE_Enable(void)
- {
- SET_BIT(RCC->BDCR, RCC_BDCR_LSEON);
- }
- /**
- * @brief Disable Low Speed External (LSE) crystal.
- * @rmtoll BDCR LSEON LL_RCC_LSE_Disable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSE_Disable(void)
- {
- CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON);
- }
- /**
- * @brief Enable external clock source (LSE bypass).
- * @rmtoll BDCR LSEBYP LL_RCC_LSE_EnableBypass
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSE_EnableBypass(void)
- {
- SET_BIT(RCC->BDCR, RCC_BDCR_LSEBYP);
- }
- /**
- * @brief Disable external clock source (LSE bypass).
- * @rmtoll BDCR LSEBYP LL_RCC_LSE_DisableBypass
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSE_DisableBypass(void)
- {
- CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP);
- }
- /**
- * @brief Set LSE oscillator drive capability
- * @note The oscillator is in Xtal mode when it is not in bypass mode.
- * @rmtoll BDCR LSEDRV LL_RCC_LSE_SetDriveCapability
- * @param LSEDrive This parameter can be one of the following values:
- * @arg @ref LL_RCC_LSEDRIVE_LOW
- * @arg @ref LL_RCC_LSEDRIVE_MEDIUMLOW
- * @arg @ref LL_RCC_LSEDRIVE_MEDIUMHIGH
- * @arg @ref LL_RCC_LSEDRIVE_HIGH
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSE_SetDriveCapability(uint32_t LSEDrive)
- {
- MODIFY_REG(RCC->BDCR, RCC_BDCR_LSEDRV, LSEDrive);
- }
- /**
- * @brief Get LSE oscillator drive capability
- * @rmtoll BDCR LSEDRV LL_RCC_LSE_GetDriveCapability
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_LSEDRIVE_LOW
- * @arg @ref LL_RCC_LSEDRIVE_MEDIUMLOW
- * @arg @ref LL_RCC_LSEDRIVE_MEDIUMHIGH
- * @arg @ref LL_RCC_LSEDRIVE_HIGH
- */
- __STATIC_INLINE uint32_t LL_RCC_LSE_GetDriveCapability(void)
- {
- return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_LSEDRV));
- }
- /**
- * @brief Enable Clock security system on LSE.
- * @rmtoll BDCR LSECSSON LL_RCC_LSE_EnableCSS
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSE_EnableCSS(void)
- {
- SET_BIT(RCC->BDCR, RCC_BDCR_LSECSSON);
- }
- /**
- * @brief Disable Clock security system on LSE.
- * @note Clock security system can be disabled only after a LSE
- * failure detection. In that case it MUST be disabled by software.
- * @rmtoll BDCR LSECSSON LL_RCC_LSE_DisableCSS
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSE_DisableCSS(void)
- {
- CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSECSSON);
- }
- /**
- * @brief Check if LSE oscillator Ready
- * @rmtoll BDCR LSERDY LL_RCC_LSE_IsReady
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_LSE_IsReady(void)
- {
- return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == RCC_BDCR_LSERDY) ? 1UL : 0UL);
- }
- /**
- * @brief Check if CSS on LSE failure Detection
- * @rmtoll BDCR LSECSSD LL_RCC_LSE_IsCSSDetected
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_LSE_IsCSSDetected(void)
- {
- return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSECSSD) == RCC_BDCR_LSECSSD) ? 1UL : 0UL);
- }
- #if defined(RCC_BDCR_LSESYSDIS)
- /**
- * @brief Disable LSE oscillator propagation
- * @note LSE clock is not propagated to any peripheral except to RTC which remains clocked
- * @note A 2 LSE-clock delay is needed for LSESYSDIS setting to be taken into account
- * @rmtoll BDCR LSESYSDIS LL_RCC_LSE_DisablePropagation
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSE_DisablePropagation(void)
- {
- SET_BIT(RCC->BDCR, RCC_BDCR_LSESYSDIS);
- }
- /**
- * @brief Enable LSE oscillator propagation
- * @note A 2 LSE-clock delay is needed for LSESYSDIS resetting to be taken into account
- * @rmtoll BDCR LSESYSDIS LL_RCC_LSE_EnablePropagation
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSE_EnablePropagation(void)
- {
- CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSESYSDIS);
- }
- /**
- * @brief Check if LSE oscillator propagation is enabled
- * @rmtoll BDCR LSESYSDIS LL_RCC_LSE_IsPropagationEnabled
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_LSE_IsPropagationEnabled(void)
- {
- return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSESYSDIS) == 0U) ? 1UL : 0UL);
- }
- #endif /* RCC_BDCR_LSESYSDIS */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_LSI LSI
- * @{
- */
- /**
- * @brief Enable LSI Oscillator
- * @rmtoll CSR LSION LL_RCC_LSI_Enable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSI_Enable(void)
- {
- SET_BIT(RCC->CSR, RCC_CSR_LSION);
- }
- /**
- * @brief Disable LSI Oscillator
- * @rmtoll CSR LSION LL_RCC_LSI_Disable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSI_Disable(void)
- {
- CLEAR_BIT(RCC->CSR, RCC_CSR_LSION);
- }
- /**
- * @brief Check if LSI is Ready
- * @rmtoll CSR LSIRDY LL_RCC_LSI_IsReady
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_LSI_IsReady(void)
- {
- return ((READ_BIT(RCC->CSR, RCC_CSR_LSIRDY) == RCC_CSR_LSIRDY) ? 1UL : 0UL);
- }
- #if defined(RCC_CSR_LSIPREDIV)
- /**
- * @brief Set LSI division factor
- * @rmtoll CSR LSIPREDIV LL_RCC_LSI_SetPrediv
- * @param LSI_PREDIV This parameter can be one of the following values:
- * @arg @ref LL_RCC_LSI_PREDIV_1
- * @arg @ref LL_RCC_LSI_PREDIV_128
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSI_SetPrediv(uint32_t LSI_PREDIV)
- {
- MODIFY_REG(RCC->CSR, RCC_CSR_LSIPREDIV, LSI_PREDIV);
- }
- /**
- * @brief Get LSI division factor
- * @rmtoll CSR LSIPREDIV LL_RCC_LSI_GetPrediv
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_LSI_PREDIV_1
- * @arg @ref LL_RCC_LSI_PREDIV_128
- */
- __STATIC_INLINE uint32_t LL_RCC_LSI_GetPrediv(void)
- {
- return (READ_BIT(RCC->CSR, RCC_CSR_LSIPREDIV));
- }
- #endif /* RCC_CSR_LSIPREDIV */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_MSI MSI
- * @{
- */
- /**
- * @brief Enable MSI oscillator
- * @rmtoll CR MSION LL_RCC_MSI_Enable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_MSI_Enable(void)
- {
- SET_BIT(RCC->CR, RCC_CR_MSION);
- }
- /**
- * @brief Disable MSI oscillator
- * @rmtoll CR MSION LL_RCC_MSI_Disable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_MSI_Disable(void)
- {
- CLEAR_BIT(RCC->CR, RCC_CR_MSION);
- }
- /**
- * @brief Check if MSI oscillator Ready
- * @rmtoll CR MSIRDY LL_RCC_MSI_IsReady
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_MSI_IsReady(void)
- {
- return ((READ_BIT(RCC->CR, RCC_CR_MSIRDY) == RCC_CR_MSIRDY) ? 1UL : 0UL);
- }
- /**
- * @brief Enable MSI PLL-mode (Hardware auto calibration with LSE)
- * @note MSIPLLEN must be enabled after LSE is enabled (LSEON enabled)
- * and ready (LSERDY set by hardware)
- * @note hardware protection to avoid enabling MSIPLLEN if LSE is not
- * ready
- * @rmtoll CR MSIPLLEN LL_RCC_MSI_EnablePLLMode
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_MSI_EnablePLLMode(void)
- {
- SET_BIT(RCC->CR, RCC_CR_MSIPLLEN);
- }
- /**
- * @brief Disable MSI-PLL mode
- * @note cleared by hardware when LSE is disabled (LSEON = 0) or when
- * the Clock Security System on LSE detects a LSE failure
- * @rmtoll CR MSIPLLEN LL_RCC_MSI_DisablePLLMode
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_MSI_DisablePLLMode(void)
- {
- CLEAR_BIT(RCC->CR, RCC_CR_MSIPLLEN);
- }
- /**
- * @brief Enable MSI clock range selection with MSIRANGE register
- * @note Write 0 has no effect. After a standby or a reset
- * MSIRGSEL is at 0 and the MSI range value is provided by
- * MSISRANGE
- * @rmtoll CR MSIRGSEL LL_RCC_MSI_EnableRangeSelection
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_MSI_EnableRangeSelection(void)
- {
- SET_BIT(RCC->CR, RCC_CR_MSIRGSEL);
- }
- /**
- * @brief Check if MSI clock range is selected with MSIRANGE register
- * @rmtoll CR MSIRGSEL LL_RCC_MSI_IsEnabledRangeSelect
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_MSI_IsEnabledRangeSelect(void)
- {
- return ((READ_BIT(RCC->CR, RCC_CR_MSIRGSEL) == RCC_CR_MSIRGSEL) ? 1UL : 0UL);
- }
- /**
- * @brief Configure the Internal Multi Speed oscillator (MSI) clock range in run mode.
- * @rmtoll CR MSIRANGE LL_RCC_MSI_SetRange
- * @param Range This parameter can be one of the following values:
- * @arg @ref LL_RCC_MSIRANGE_0
- * @arg @ref LL_RCC_MSIRANGE_1
- * @arg @ref LL_RCC_MSIRANGE_2
- * @arg @ref LL_RCC_MSIRANGE_3
- * @arg @ref LL_RCC_MSIRANGE_4
- * @arg @ref LL_RCC_MSIRANGE_5
- * @arg @ref LL_RCC_MSIRANGE_6
- * @arg @ref LL_RCC_MSIRANGE_7
- * @arg @ref LL_RCC_MSIRANGE_8
- * @arg @ref LL_RCC_MSIRANGE_9
- * @arg @ref LL_RCC_MSIRANGE_10
- * @arg @ref LL_RCC_MSIRANGE_11
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_MSI_SetRange(uint32_t Range)
- {
- MODIFY_REG(RCC->CR, RCC_CR_MSIRANGE, Range);
- }
- /**
- * @brief Get the Internal Multi Speed oscillator (MSI) clock range in run mode.
- * @rmtoll CR MSIRANGE LL_RCC_MSI_GetRange
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_MSIRANGE_0
- * @arg @ref LL_RCC_MSIRANGE_1
- * @arg @ref LL_RCC_MSIRANGE_2
- * @arg @ref LL_RCC_MSIRANGE_3
- * @arg @ref LL_RCC_MSIRANGE_4
- * @arg @ref LL_RCC_MSIRANGE_5
- * @arg @ref LL_RCC_MSIRANGE_6
- * @arg @ref LL_RCC_MSIRANGE_7
- * @arg @ref LL_RCC_MSIRANGE_8
- * @arg @ref LL_RCC_MSIRANGE_9
- * @arg @ref LL_RCC_MSIRANGE_10
- * @arg @ref LL_RCC_MSIRANGE_11
- */
- __STATIC_INLINE uint32_t LL_RCC_MSI_GetRange(void)
- {
- return (uint32_t)(READ_BIT(RCC->CR, RCC_CR_MSIRANGE));
- }
- /**
- * @brief Configure MSI range used after standby
- * @rmtoll CSR MSISRANGE LL_RCC_MSI_SetRangeAfterStandby
- * @param Range This parameter can be one of the following values:
- * @arg @ref LL_RCC_MSISRANGE_4
- * @arg @ref LL_RCC_MSISRANGE_5
- * @arg @ref LL_RCC_MSISRANGE_6
- * @arg @ref LL_RCC_MSISRANGE_7
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_MSI_SetRangeAfterStandby(uint32_t Range)
- {
- MODIFY_REG(RCC->CSR, RCC_CSR_MSISRANGE, Range);
- }
- /**
- * @brief Get MSI range used after standby
- * @rmtoll CSR MSISRANGE LL_RCC_MSI_GetRangeAfterStandby
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_MSISRANGE_4
- * @arg @ref LL_RCC_MSISRANGE_5
- * @arg @ref LL_RCC_MSISRANGE_6
- * @arg @ref LL_RCC_MSISRANGE_7
- */
- __STATIC_INLINE uint32_t LL_RCC_MSI_GetRangeAfterStandby(void)
- {
- return (uint32_t)(READ_BIT(RCC->CSR, RCC_CSR_MSISRANGE));
- }
- /**
- * @brief Get MSI Calibration value
- * @note When MSITRIM is written, MSICAL is updated with the sum of
- * MSITRIM and the factory trim value
- * @rmtoll ICSCR MSICAL LL_RCC_MSI_GetCalibration
- * @retval Between Min_Data = 0 and Max_Data = 255
- */
- __STATIC_INLINE uint32_t LL_RCC_MSI_GetCalibration(void)
- {
- return (uint32_t)(READ_BIT(RCC->ICSCR, RCC_ICSCR_MSICAL) >> RCC_ICSCR_MSICAL_Pos);
- }
- /**
- * @brief Set MSI Calibration trimming
- * @note user-programmable trimming value that is added to the MSICAL
- * @rmtoll ICSCR MSITRIM LL_RCC_MSI_SetCalibTrimming
- * @param Value Between Min_Data = 0 and Max_Data = 255
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_MSI_SetCalibTrimming(uint32_t Value)
- {
- MODIFY_REG(RCC->ICSCR, RCC_ICSCR_MSITRIM, Value << RCC_ICSCR_MSITRIM_Pos);
- }
- /**
- * @brief Get MSI Calibration trimming
- * @rmtoll ICSCR MSITRIM LL_RCC_MSI_GetCalibTrimming
- * @retval Between 0 and 255
- */
- __STATIC_INLINE uint32_t LL_RCC_MSI_GetCalibTrimming(void)
- {
- return (uint32_t)(READ_BIT(RCC->ICSCR, RCC_ICSCR_MSITRIM) >> RCC_ICSCR_MSITRIM_Pos);
- }
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_LSCO LSCO
- * @{
- */
- /**
- * @brief Enable Low speed clock
- * @rmtoll BDCR LSCOEN LL_RCC_LSCO_Enable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSCO_Enable(void)
- {
- SET_BIT(RCC->BDCR, RCC_BDCR_LSCOEN);
- }
- /**
- * @brief Disable Low speed clock
- * @rmtoll BDCR LSCOEN LL_RCC_LSCO_Disable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSCO_Disable(void)
- {
- CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSCOEN);
- }
- /**
- * @brief Configure Low speed clock selection
- * @rmtoll BDCR LSCOSEL LL_RCC_LSCO_SetSource
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_LSCO_CLKSOURCE_LSI
- * @arg @ref LL_RCC_LSCO_CLKSOURCE_LSE
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_LSCO_SetSource(uint32_t Source)
- {
- MODIFY_REG(RCC->BDCR, RCC_BDCR_LSCOSEL, Source);
- }
- /**
- * @brief Get Low speed clock selection
- * @rmtoll BDCR LSCOSEL LL_RCC_LSCO_GetSource
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_LSCO_CLKSOURCE_LSI
- * @arg @ref LL_RCC_LSCO_CLKSOURCE_LSE
- */
- __STATIC_INLINE uint32_t LL_RCC_LSCO_GetSource(void)
- {
- return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_LSCOSEL));
- }
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_System System
- * @{
- */
- /**
- * @brief Configure the system clock source
- * @rmtoll CFGR SW LL_RCC_SetSysClkSource
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_SYS_CLKSOURCE_MSI
- * @arg @ref LL_RCC_SYS_CLKSOURCE_HSI
- * @arg @ref LL_RCC_SYS_CLKSOURCE_HSE
- * @arg @ref LL_RCC_SYS_CLKSOURCE_PLL
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetSysClkSource(uint32_t Source)
- {
- MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, Source);
- }
- /**
- * @brief Get the system clock source
- * @rmtoll CFGR SWS LL_RCC_GetSysClkSource
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_MSI
- * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_HSI
- * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_HSE
- * @arg @ref LL_RCC_SYS_CLKSOURCE_STATUS_PLL
- */
- __STATIC_INLINE uint32_t LL_RCC_GetSysClkSource(void)
- {
- return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_SWS));
- }
- /**
- * @brief Set AHB prescaler
- * @rmtoll CFGR HPRE LL_RCC_SetAHBPrescaler
- * @param Prescaler This parameter can be one of the following values:
- * @arg @ref LL_RCC_SYSCLK_DIV_1
- * @arg @ref LL_RCC_SYSCLK_DIV_2
- * @arg @ref LL_RCC_SYSCLK_DIV_4
- * @arg @ref LL_RCC_SYSCLK_DIV_8
- * @arg @ref LL_RCC_SYSCLK_DIV_16
- * @arg @ref LL_RCC_SYSCLK_DIV_64
- * @arg @ref LL_RCC_SYSCLK_DIV_128
- * @arg @ref LL_RCC_SYSCLK_DIV_256
- * @arg @ref LL_RCC_SYSCLK_DIV_512
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetAHBPrescaler(uint32_t Prescaler)
- {
- MODIFY_REG(RCC->CFGR, RCC_CFGR_HPRE, Prescaler);
- }
- /**
- * @brief Set APB1 prescaler
- * @rmtoll CFGR PPRE1 LL_RCC_SetAPB1Prescaler
- * @param Prescaler This parameter can be one of the following values:
- * @arg @ref LL_RCC_APB1_DIV_1
- * @arg @ref LL_RCC_APB1_DIV_2
- * @arg @ref LL_RCC_APB1_DIV_4
- * @arg @ref LL_RCC_APB1_DIV_8
- * @arg @ref LL_RCC_APB1_DIV_16
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetAPB1Prescaler(uint32_t Prescaler)
- {
- MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE1, Prescaler);
- }
- /**
- * @brief Set APB2 prescaler
- * @rmtoll CFGR PPRE2 LL_RCC_SetAPB2Prescaler
- * @param Prescaler This parameter can be one of the following values:
- * @arg @ref LL_RCC_APB2_DIV_1
- * @arg @ref LL_RCC_APB2_DIV_2
- * @arg @ref LL_RCC_APB2_DIV_4
- * @arg @ref LL_RCC_APB2_DIV_8
- * @arg @ref LL_RCC_APB2_DIV_16
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetAPB2Prescaler(uint32_t Prescaler)
- {
- MODIFY_REG(RCC->CFGR, RCC_CFGR_PPRE2, Prescaler);
- }
- /**
- * @brief Get AHB prescaler
- * @rmtoll CFGR HPRE LL_RCC_GetAHBPrescaler
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_SYSCLK_DIV_1
- * @arg @ref LL_RCC_SYSCLK_DIV_2
- * @arg @ref LL_RCC_SYSCLK_DIV_4
- * @arg @ref LL_RCC_SYSCLK_DIV_8
- * @arg @ref LL_RCC_SYSCLK_DIV_16
- * @arg @ref LL_RCC_SYSCLK_DIV_64
- * @arg @ref LL_RCC_SYSCLK_DIV_128
- * @arg @ref LL_RCC_SYSCLK_DIV_256
- * @arg @ref LL_RCC_SYSCLK_DIV_512
- */
- __STATIC_INLINE uint32_t LL_RCC_GetAHBPrescaler(void)
- {
- return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_HPRE));
- }
- /**
- * @brief Get APB1 prescaler
- * @rmtoll CFGR PPRE1 LL_RCC_GetAPB1Prescaler
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_APB1_DIV_1
- * @arg @ref LL_RCC_APB1_DIV_2
- * @arg @ref LL_RCC_APB1_DIV_4
- * @arg @ref LL_RCC_APB1_DIV_8
- * @arg @ref LL_RCC_APB1_DIV_16
- */
- __STATIC_INLINE uint32_t LL_RCC_GetAPB1Prescaler(void)
- {
- return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_PPRE1));
- }
- /**
- * @brief Get APB2 prescaler
- * @rmtoll CFGR PPRE2 LL_RCC_GetAPB2Prescaler
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_APB2_DIV_1
- * @arg @ref LL_RCC_APB2_DIV_2
- * @arg @ref LL_RCC_APB2_DIV_4
- * @arg @ref LL_RCC_APB2_DIV_8
- * @arg @ref LL_RCC_APB2_DIV_16
- */
- __STATIC_INLINE uint32_t LL_RCC_GetAPB2Prescaler(void)
- {
- return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_PPRE2));
- }
- /**
- * @brief Set Clock After Wake-Up From Stop mode
- * @rmtoll CFGR STOPWUCK LL_RCC_SetClkAfterWakeFromStop
- * @param Clock This parameter can be one of the following values:
- * @arg @ref LL_RCC_STOP_WAKEUPCLOCK_MSI
- * @arg @ref LL_RCC_STOP_WAKEUPCLOCK_HSI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetClkAfterWakeFromStop(uint32_t Clock)
- {
- MODIFY_REG(RCC->CFGR, RCC_CFGR_STOPWUCK, Clock);
- }
- /**
- * @brief Get Clock After Wake-Up From Stop mode
- * @rmtoll CFGR STOPWUCK LL_RCC_GetClkAfterWakeFromStop
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_STOP_WAKEUPCLOCK_MSI
- * @arg @ref LL_RCC_STOP_WAKEUPCLOCK_HSI
- */
- __STATIC_INLINE uint32_t LL_RCC_GetClkAfterWakeFromStop(void)
- {
- return (uint32_t)(READ_BIT(RCC->CFGR, RCC_CFGR_STOPWUCK));
- }
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_MCO MCO
- * @{
- */
- /**
- * @brief Configure MCOx
- * @rmtoll CFGR MCOSEL LL_RCC_ConfigMCO\n
- * CFGR MCOPRE LL_RCC_ConfigMCO
- * @param MCOxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_MCO1SOURCE_NOCLOCK
- * @arg @ref LL_RCC_MCO1SOURCE_SYSCLK
- * @arg @ref LL_RCC_MCO1SOURCE_MSI
- * @arg @ref LL_RCC_MCO1SOURCE_HSI
- * @arg @ref LL_RCC_MCO1SOURCE_HSE
- * @arg @ref LL_RCC_MCO1SOURCE_HSI48 (*)
- * @arg @ref LL_RCC_MCO1SOURCE_PLLCLK
- * @arg @ref LL_RCC_MCO1SOURCE_LSI
- * @arg @ref LL_RCC_MCO1SOURCE_LSE
- *
- * (*) value not defined in all devices.
- * @param MCOxPrescaler This parameter can be one of the following values:
- * @arg @ref LL_RCC_MCO1_DIV_1
- * @arg @ref LL_RCC_MCO1_DIV_2
- * @arg @ref LL_RCC_MCO1_DIV_4
- * @arg @ref LL_RCC_MCO1_DIV_8
- * @arg @ref LL_RCC_MCO1_DIV_16
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ConfigMCO(uint32_t MCOxSource, uint32_t MCOxPrescaler)
- {
- MODIFY_REG(RCC->CFGR, RCC_CFGR_MCOSEL | RCC_CFGR_MCOPRE, MCOxSource | MCOxPrescaler);
- }
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_Peripheral_Clock_Source Peripheral Clock Source
- * @{
- */
- /**
- * @brief Configure USARTx clock source
- * @rmtoll CCIPR USARTxSEL LL_RCC_SetUSARTClockSource
- * @param USARTxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_USART1_CLKSOURCE_PCLK2
- * @arg @ref LL_RCC_USART1_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_USART1_CLKSOURCE_HSI
- * @arg @ref LL_RCC_USART1_CLKSOURCE_LSE
- * @arg @ref LL_RCC_USART2_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_USART2_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_USART2_CLKSOURCE_HSI
- * @arg @ref LL_RCC_USART2_CLKSOURCE_LSE
- * @arg @ref LL_RCC_USART3_CLKSOURCE_PCLK1 (*)
- * @arg @ref LL_RCC_USART3_CLKSOURCE_SYSCLK (*)
- * @arg @ref LL_RCC_USART3_CLKSOURCE_HSI (*)
- * @arg @ref LL_RCC_USART3_CLKSOURCE_LSE (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetUSARTClockSource(uint32_t USARTxSource)
- {
- MODIFY_REG(RCC->CCIPR, (USARTxSource >> 16U), (USARTxSource & 0x0000FFFFU));
- }
- #if defined(UART4) || defined(UART5)
- /**
- * @brief Configure UARTx clock source
- * @rmtoll CCIPR UARTxSEL LL_RCC_SetUARTClockSource
- * @param UARTxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_UART4_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_UART4_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_UART4_CLKSOURCE_HSI
- * @arg @ref LL_RCC_UART4_CLKSOURCE_LSE
- * @arg @ref LL_RCC_UART5_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_UART5_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_UART5_CLKSOURCE_HSI
- * @arg @ref LL_RCC_UART5_CLKSOURCE_LSE
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetUARTClockSource(uint32_t UARTxSource)
- {
- MODIFY_REG(RCC->CCIPR, (UARTxSource >> 16U), (UARTxSource & 0x0000FFFFU));
- }
- #endif /* UART4 || UART5 */
- /**
- * @brief Configure LPUART1x clock source
- * @rmtoll CCIPR LPUART1SEL LL_RCC_SetLPUARTClockSource
- * @param LPUARTxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_LPUART1_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_LPUART1_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_LPUART1_CLKSOURCE_HSI
- * @arg @ref LL_RCC_LPUART1_CLKSOURCE_LSE
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetLPUARTClockSource(uint32_t LPUARTxSource)
- {
- MODIFY_REG(RCC->CCIPR, RCC_CCIPR_LPUART1SEL, LPUARTxSource);
- }
- /**
- * @brief Configure I2Cx clock source
- * @rmtoll CCIPR I2CxSEL LL_RCC_SetI2CClockSource
- * @param I2CxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_I2C1_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_I2C1_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_I2C1_CLKSOURCE_HSI
- * @arg @ref LL_RCC_I2C2_CLKSOURCE_PCLK1 (*)
- * @arg @ref LL_RCC_I2C2_CLKSOURCE_SYSCLK (*)
- * @arg @ref LL_RCC_I2C2_CLKSOURCE_HSI (*)
- * @arg @ref LL_RCC_I2C3_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_I2C3_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_I2C3_CLKSOURCE_HSI
- * @arg @ref LL_RCC_I2C4_CLKSOURCE_PCLK1 (*)
- * @arg @ref LL_RCC_I2C4_CLKSOURCE_SYSCLK (*)
- * @arg @ref LL_RCC_I2C4_CLKSOURCE_HSI (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetI2CClockSource(uint32_t I2CxSource)
- {
- __IO uint32_t *reg = (__IO uint32_t *)(uint32_t)(RCC_BASE + 0x88U + (I2CxSource >> 24U));
- MODIFY_REG(*reg, 3UL << ((I2CxSource & 0x001F0000U) >> 16U), ((I2CxSource & 0x000000FFU) << ((I2CxSource & 0x001F0000U) >> 16U)));
- }
- /**
- * @brief Configure LPTIMx clock source
- * @rmtoll CCIPR LPTIMxSEL LL_RCC_SetLPTIMClockSource
- * @param LPTIMxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_LSI
- * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_HSI
- * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_LSE
- * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_LSI
- * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_HSI
- * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_LSE
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetLPTIMClockSource(uint32_t LPTIMxSource)
- {
- MODIFY_REG(RCC->CCIPR, (LPTIMxSource & 0xFFFF0000U), (LPTIMxSource << 16U));
- }
- #if defined(RCC_CCIPR_SAI1SEL) || defined(RCC_CCIPR2_SAI1SEL)
- /**
- * @brief Configure SAIx clock source
- @if STM32L4S9xx
- * @rmtoll CCIPR2 SAIxSEL LL_RCC_SetSAIClockSource
- @else
- * @rmtoll CCIPR SAIxSEL LL_RCC_SetSAIClockSource
- @endif
- * @param SAIxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLLSAI1
- * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLLSAI2 (*)
- * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLL
- * @arg @ref LL_RCC_SAI1_CLKSOURCE_PIN
- * @arg @ref LL_RCC_SAI2_CLKSOURCE_PLLSAI1 (*)
- * @arg @ref LL_RCC_SAI2_CLKSOURCE_PLLSAI2 (*)
- * @arg @ref LL_RCC_SAI2_CLKSOURCE_PLL (*)
- * @arg @ref LL_RCC_SAI2_CLKSOURCE_PIN (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetSAIClockSource(uint32_t SAIxSource)
- {
- #if defined(RCC_CCIPR2_SAI1SEL)
- MODIFY_REG(RCC->CCIPR2, (SAIxSource >> 16U), (SAIxSource & 0x0000FFFFU));
- #else
- MODIFY_REG(RCC->CCIPR, (SAIxSource & 0xFFFF0000U), (SAIxSource << 16U));
- #endif /* RCC_CCIPR2_SAI1SEL */
- }
- #endif /* RCC_CCIPR_SAI1SEL || RCC_CCIPR2_SAI1SEL */
- #if defined(RCC_CCIPR2_SDMMCSEL)
- /**
- * @brief Configure SDMMC1 kernel clock source
- * @rmtoll CCIPR2 SDMMCSEL LL_RCC_SetSDMMCKernelClockSource
- * @param SDMMCxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_SDMMC1_KERNELCLKSOURCE_48CLK (*)
- * @arg @ref LL_RCC_SDMMC1_KERNELCLKSOURCE_PLLP (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetSDMMCKernelClockSource(uint32_t SDMMCxSource)
- {
- MODIFY_REG(RCC->CCIPR2, RCC_CCIPR2_SDMMCSEL, SDMMCxSource);
- }
- #endif /* RCC_CCIPR2_SDMMCSEL */
- /**
- * @brief Configure SDMMC1 clock source
- * @rmtoll CCIPR CLK48SEL LL_RCC_SetSDMMCClockSource
- * @param SDMMCxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE_NONE (*)
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE_HSI48 (*)
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE_PLLSAI1 (*)
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE_PLL
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE_MSI (*)
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetSDMMCClockSource(uint32_t SDMMCxSource)
- {
- MODIFY_REG(RCC->CCIPR, RCC_CCIPR_CLK48SEL, SDMMCxSource);
- }
- /**
- * @brief Configure RNG clock source
- * @rmtoll CCIPR CLK48SEL LL_RCC_SetRNGClockSource
- * @param RNGxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_RNG_CLKSOURCE_NONE (*)
- * @arg @ref LL_RCC_RNG_CLKSOURCE_HSI48 (*)
- * @arg @ref LL_RCC_RNG_CLKSOURCE_PLLSAI1 (*)
- * @arg @ref LL_RCC_RNG_CLKSOURCE_PLL
- * @arg @ref LL_RCC_RNG_CLKSOURCE_MSI
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetRNGClockSource(uint32_t RNGxSource)
- {
- MODIFY_REG(RCC->CCIPR, RCC_CCIPR_CLK48SEL, RNGxSource);
- }
- #if defined(USB_OTG_FS) || defined(USB)
- /**
- * @brief Configure USB clock source
- * @rmtoll CCIPR CLK48SEL LL_RCC_SetUSBClockSource
- * @param USBxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_USB_CLKSOURCE_NONE (*)
- * @arg @ref LL_RCC_USB_CLKSOURCE_HSI48 (*)
- * @arg @ref LL_RCC_USB_CLKSOURCE_PLLSAI1 (*)
- * @arg @ref LL_RCC_USB_CLKSOURCE_PLL
- * @arg @ref LL_RCC_USB_CLKSOURCE_MSI
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetUSBClockSource(uint32_t USBxSource)
- {
- MODIFY_REG(RCC->CCIPR, RCC_CCIPR_CLK48SEL, USBxSource);
- }
- #endif /* USB_OTG_FS || USB */
- #if defined(RCC_CCIPR_ADCSEL)
- /**
- * @brief Configure ADC clock source
- * @rmtoll CCIPR ADCSEL LL_RCC_SetADCClockSource
- * @param ADCxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_ADC_CLKSOURCE_NONE
- * @arg @ref LL_RCC_ADC_CLKSOURCE_PLLSAI1 (*)
- * @arg @ref LL_RCC_ADC_CLKSOURCE_PLLSAI2 (*)
- * @arg @ref LL_RCC_ADC_CLKSOURCE_SYSCLK
- *
- * (*) value not defined in all devices.
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetADCClockSource(uint32_t ADCxSource)
- {
- MODIFY_REG(RCC->CCIPR, RCC_CCIPR_ADCSEL, ADCxSource);
- }
- #endif /* RCC_CCIPR_ADCSEL */
- #if defined(SWPMI1)
- /**
- * @brief Configure SWPMI clock source
- * @rmtoll CCIPR SWPMI1SEL LL_RCC_SetSWPMIClockSource
- * @param SWPMIxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_SWPMI1_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_SWPMI1_CLKSOURCE_HSI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetSWPMIClockSource(uint32_t SWPMIxSource)
- {
- MODIFY_REG(RCC->CCIPR, RCC_CCIPR_SWPMI1SEL, SWPMIxSource);
- }
- #endif /* SWPMI1 */
- #if defined(DFSDM1_Channel0)
- #if defined(RCC_CCIPR2_ADFSDM1SEL)
- /**
- * @brief Configure DFSDM Audio clock source
- * @rmtoll CCIPR2 ADFSDM1SEL LL_RCC_SetDFSDMAudioClockSource
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_DFSDM1_AUDIO_CLKSOURCE_SAI1
- * @arg @ref LL_RCC_DFSDM1_AUDIO_CLKSOURCE_HSI
- * @arg @ref LL_RCC_DFSDM1_AUDIO_CLKSOURCE_MSI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetDFSDMAudioClockSource(uint32_t Source)
- {
- MODIFY_REG(RCC->CCIPR2, RCC_CCIPR2_ADFSDM1SEL, Source);
- }
- #endif /* RCC_CCIPR2_ADFSDM1SEL */
- /**
- * @brief Configure DFSDM Kernel clock source
- @if STM32L4S9xx
- * @rmtoll CCIPR2 DFSDM1SEL LL_RCC_SetDFSDMClockSource
- @else
- * @rmtoll CCIPR DFSDM1SEL LL_RCC_SetDFSDMClockSource
- @endif
- * @param DFSDMxSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_DFSDM1_CLKSOURCE_PCLK2
- * @arg @ref LL_RCC_DFSDM1_CLKSOURCE_SYSCLK
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetDFSDMClockSource(uint32_t DFSDMxSource)
- {
- #if defined(RCC_CCIPR2_DFSDM1SEL)
- MODIFY_REG(RCC->CCIPR2, RCC_CCIPR2_DFSDM1SEL, DFSDMxSource);
- #else
- MODIFY_REG(RCC->CCIPR, RCC_CCIPR_DFSDM1SEL, DFSDMxSource);
- #endif /* RCC_CCIPR2_DFSDM1SEL */
- }
- #endif /* DFSDM1_Channel0 */
- #if defined(DSI)
- /**
- * @brief Configure DSI clock source
- * @rmtoll CCIPR2 DSISEL LL_RCC_SetDSIClockSource
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_DSI_CLKSOURCE_PHY
- * @arg @ref LL_RCC_DSI_CLKSOURCE_PLL
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetDSIClockSource(uint32_t Source)
- {
- MODIFY_REG(RCC->CCIPR2, RCC_CCIPR2_DSISEL, Source);
- }
- #endif /* DSI */
- #if defined(LTDC)
- /**
- * @brief Configure LTDC Clock Source
- * @rmtoll CCIPR2 PLLSAI2DIVR LL_RCC_SetLTDCClockSource
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV2
- * @arg @ref LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV4
- * @arg @ref LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV8
- * @arg @ref LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV16
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetLTDCClockSource(uint32_t Source)
- {
- MODIFY_REG(RCC->CCIPR2, RCC_CCIPR2_PLLSAI2DIVR, Source);
- }
- #endif /* LTDC */
- #if defined(OCTOSPI1)
- /**
- * @brief Configure OCTOSPI clock source
- * @rmtoll CCIPR2 OSPISEL LL_RCC_SetOCTOSPIClockSource
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_OCTOSPI_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_OCTOSPI_CLKSOURCE_MSI
- * @arg @ref LL_RCC_OCTOSPI_CLKSOURCE_PLL
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetOCTOSPIClockSource(uint32_t Source)
- {
- MODIFY_REG(RCC->CCIPR2, RCC_CCIPR2_OSPISEL, Source);
- }
- #endif /* OCTOSPI1 */
- /**
- * @brief Get USARTx clock source
- * @rmtoll CCIPR USARTxSEL LL_RCC_GetUSARTClockSource
- * @param USARTx This parameter can be one of the following values:
- * @arg @ref LL_RCC_USART1_CLKSOURCE
- * @arg @ref LL_RCC_USART2_CLKSOURCE
- * @arg @ref LL_RCC_USART3_CLKSOURCE (*)
- *
- * (*) value not defined in all devices.
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_USART1_CLKSOURCE_PCLK2
- * @arg @ref LL_RCC_USART1_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_USART1_CLKSOURCE_HSI
- * @arg @ref LL_RCC_USART1_CLKSOURCE_LSE
- * @arg @ref LL_RCC_USART2_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_USART2_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_USART2_CLKSOURCE_HSI
- * @arg @ref LL_RCC_USART2_CLKSOURCE_LSE
- * @arg @ref LL_RCC_USART3_CLKSOURCE_PCLK1 (*)
- * @arg @ref LL_RCC_USART3_CLKSOURCE_SYSCLK (*)
- * @arg @ref LL_RCC_USART3_CLKSOURCE_HSI (*)
- * @arg @ref LL_RCC_USART3_CLKSOURCE_LSE (*)
- *
- * (*) value not defined in all devices.
- */
- __STATIC_INLINE uint32_t LL_RCC_GetUSARTClockSource(uint32_t USARTx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR, USARTx) | (USARTx << 16U));
- }
- #if defined(UART4) || defined(UART5)
- /**
- * @brief Get UARTx clock source
- * @rmtoll CCIPR UARTxSEL LL_RCC_GetUARTClockSource
- * @param UARTx This parameter can be one of the following values:
- * @arg @ref LL_RCC_UART4_CLKSOURCE
- * @arg @ref LL_RCC_UART5_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_UART4_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_UART4_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_UART4_CLKSOURCE_HSI
- * @arg @ref LL_RCC_UART4_CLKSOURCE_LSE
- * @arg @ref LL_RCC_UART5_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_UART5_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_UART5_CLKSOURCE_HSI
- * @arg @ref LL_RCC_UART5_CLKSOURCE_LSE
- */
- __STATIC_INLINE uint32_t LL_RCC_GetUARTClockSource(uint32_t UARTx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR, UARTx) | (UARTx << 16U));
- }
- #endif /* UART4 || UART5 */
- /**
- * @brief Get LPUARTx clock source
- * @rmtoll CCIPR LPUART1SEL LL_RCC_GetLPUARTClockSource
- * @param LPUARTx This parameter can be one of the following values:
- * @arg @ref LL_RCC_LPUART1_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_LPUART1_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_LPUART1_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_LPUART1_CLKSOURCE_HSI
- * @arg @ref LL_RCC_LPUART1_CLKSOURCE_LSE
- */
- __STATIC_INLINE uint32_t LL_RCC_GetLPUARTClockSource(uint32_t LPUARTx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR, LPUARTx));
- }
- /**
- * @brief Get I2Cx clock source
- * @rmtoll CCIPR I2CxSEL LL_RCC_GetI2CClockSource
- * @param I2Cx This parameter can be one of the following values:
- * @arg @ref LL_RCC_I2C1_CLKSOURCE
- * @arg @ref LL_RCC_I2C2_CLKSOURCE (*)
- * @arg @ref LL_RCC_I2C3_CLKSOURCE
- * @arg @ref LL_RCC_I2C4_CLKSOURCE (*)
- *
- * (*) value not defined in all devices.
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_I2C1_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_I2C1_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_I2C1_CLKSOURCE_HSI
- * @arg @ref LL_RCC_I2C2_CLKSOURCE_PCLK1 (*)
- * @arg @ref LL_RCC_I2C2_CLKSOURCE_SYSCLK (*)
- * @arg @ref LL_RCC_I2C2_CLKSOURCE_HSI (*)
- * @arg @ref LL_RCC_I2C3_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_I2C3_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_I2C3_CLKSOURCE_HSI
- * @arg @ref LL_RCC_I2C4_CLKSOURCE_PCLK1 (*)
- * @arg @ref LL_RCC_I2C4_CLKSOURCE_SYSCLK (*)
- * @arg @ref LL_RCC_I2C4_CLKSOURCE_HSI (*)
- *
- * (*) value not defined in all devices.
- */
- __STATIC_INLINE uint32_t LL_RCC_GetI2CClockSource(uint32_t I2Cx)
- {
- __IO const uint32_t *reg = (__IO uint32_t *)(uint32_t)(RCC_BASE + 0x88U + (I2Cx >> 24U));
- return (uint32_t)((READ_BIT(*reg, 3UL << ((I2Cx & 0x001F0000U) >> 16U)) >> ((I2Cx & 0x001F0000U) >> 16U)) | (I2Cx & 0xFFFF0000U));
- }
- /**
- * @brief Get LPTIMx clock source
- * @rmtoll CCIPR LPTIMxSEL LL_RCC_GetLPTIMClockSource
- * @param LPTIMx This parameter can be one of the following values:
- * @arg @ref LL_RCC_LPTIM1_CLKSOURCE
- * @arg @ref LL_RCC_LPTIM2_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_LSI
- * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_HSI
- * @arg @ref LL_RCC_LPTIM1_CLKSOURCE_LSE
- * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_LSI
- * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_HSI
- * @arg @ref LL_RCC_LPTIM2_CLKSOURCE_LSE
- */
- __STATIC_INLINE uint32_t LL_RCC_GetLPTIMClockSource(uint32_t LPTIMx)
- {
- return (uint32_t)((READ_BIT(RCC->CCIPR, LPTIMx) >> 16U) | LPTIMx);
- }
- #if defined(RCC_CCIPR_SAI1SEL) || defined(RCC_CCIPR2_SAI1SEL)
- /**
- * @brief Get SAIx clock source
- @if STM32L4S9xx
- * @rmtoll CCIPR2 SAIxSEL LL_RCC_GetSAIClockSource
- @else
- * @rmtoll CCIPR SAIxSEL LL_RCC_GetSAIClockSource
- @endif
- * @param SAIx This parameter can be one of the following values:
- * @arg @ref LL_RCC_SAI1_CLKSOURCE
- * @arg @ref LL_RCC_SAI2_CLKSOURCE (*)
- *
- * (*) value not defined in all devices.
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLLSAI1
- * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLLSAI2 (*)
- * @arg @ref LL_RCC_SAI1_CLKSOURCE_PLL
- * @arg @ref LL_RCC_SAI1_CLKSOURCE_PIN
- * @arg @ref LL_RCC_SAI2_CLKSOURCE_PLLSAI1 (*)
- * @arg @ref LL_RCC_SAI2_CLKSOURCE_PLLSAI2 (*)
- * @arg @ref LL_RCC_SAI2_CLKSOURCE_PLL (*)
- * @arg @ref LL_RCC_SAI2_CLKSOURCE_PIN (*)
- *
- * (*) value not defined in all devices.
- */
- __STATIC_INLINE uint32_t LL_RCC_GetSAIClockSource(uint32_t SAIx)
- {
- #if defined(RCC_CCIPR2_SAI1SEL)
- return (uint32_t)(READ_BIT(RCC->CCIPR2, SAIx) | (SAIx << 16U));
- #else
- return (uint32_t)(READ_BIT(RCC->CCIPR, SAIx) >> 16U | SAIx);
- #endif /* RCC_CCIPR2_SAI1SEL */
- }
- #endif /* RCC_CCIPR_SAI1SEL || RCC_CCIPR2_SAI1SEL */
- #if defined(SDMMC1)
- #if defined(RCC_CCIPR2_SDMMCSEL)
- /**
- * @brief Get SDMMCx kernel clock source
- * @rmtoll CCIPR2 SDMMCSEL LL_RCC_GetSDMMCKernelClockSource
- * @param SDMMCx This parameter can be one of the following values:
- * @arg @ref LL_RCC_SDMMC1_KERNELCLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_SDMMC1_KERNELCLKSOURCE_48CLK (*)
- * @arg @ref LL_RCC_SDMMC1_KERNELCLKSOURCE_PLL (*)
- *
- * (*) value not defined in all devices.
- */
- __STATIC_INLINE uint32_t LL_RCC_GetSDMMCKernelClockSource(uint32_t SDMMCx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR2, SDMMCx));
- }
- #endif /* RCC_CCIPR2_SDMMCSEL */
- /**
- * @brief Get SDMMCx clock source
- * @rmtoll CCIPR CLK48SEL LL_RCC_GetSDMMCClockSource
- * @param SDMMCx This parameter can be one of the following values:
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE_NONE (*)
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE_HSI48 (*)
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE_PLLSAI1 (*)
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE_PLL
- * @arg @ref LL_RCC_SDMMC1_CLKSOURCE_MSI (*)
- *
- * (*) value not defined in all devices.
- */
- __STATIC_INLINE uint32_t LL_RCC_GetSDMMCClockSource(uint32_t SDMMCx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR, SDMMCx));
- }
- #endif /* SDMMC1 */
- /**
- * @brief Get RNGx clock source
- * @rmtoll CCIPR CLK48SEL LL_RCC_GetRNGClockSource
- * @param RNGx This parameter can be one of the following values:
- * @arg @ref LL_RCC_RNG_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_RNG_CLKSOURCE_NONE (*)
- * @arg @ref LL_RCC_RNG_CLKSOURCE_HSI48 (*)
- * @arg @ref LL_RCC_RNG_CLKSOURCE_PLLSAI1 (*)
- * @arg @ref LL_RCC_RNG_CLKSOURCE_PLL
- * @arg @ref LL_RCC_RNG_CLKSOURCE_MSI
- *
- * (*) value not defined in all devices.
- */
- __STATIC_INLINE uint32_t LL_RCC_GetRNGClockSource(uint32_t RNGx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR, RNGx));
- }
- #if defined(USB_OTG_FS) || defined(USB)
- /**
- * @brief Get USBx clock source
- * @rmtoll CCIPR CLK48SEL LL_RCC_GetUSBClockSource
- * @param USBx This parameter can be one of the following values:
- * @arg @ref LL_RCC_USB_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_USB_CLKSOURCE_NONE (*)
- * @arg @ref LL_RCC_USB_CLKSOURCE_HSI48 (*)
- * @arg @ref LL_RCC_USB_CLKSOURCE_PLLSAI1 (*)
- * @arg @ref LL_RCC_USB_CLKSOURCE_PLL
- * @arg @ref LL_RCC_USB_CLKSOURCE_MSI
- *
- * (*) value not defined in all devices.
- */
- __STATIC_INLINE uint32_t LL_RCC_GetUSBClockSource(uint32_t USBx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR, USBx));
- }
- #endif /* USB_OTG_FS || USB */
- /**
- * @brief Get ADCx clock source
- * @rmtoll CCIPR ADCSEL LL_RCC_GetADCClockSource
- * @param ADCx This parameter can be one of the following values:
- * @arg @ref LL_RCC_ADC_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_ADC_CLKSOURCE_NONE
- * @arg @ref LL_RCC_ADC_CLKSOURCE_PLLSAI1 (*)
- * @arg @ref LL_RCC_ADC_CLKSOURCE_PLLSAI2 (*)
- * @arg @ref LL_RCC_ADC_CLKSOURCE_SYSCLK
- *
- * (*) value not defined in all devices.
- */
- __STATIC_INLINE uint32_t LL_RCC_GetADCClockSource(uint32_t ADCx)
- {
- #if defined(RCC_CCIPR_ADCSEL)
- return (uint32_t)(READ_BIT(RCC->CCIPR, ADCx));
- #else
- (void)ADCx; /* unused */
- return ((READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_ADCEN) != 0U) ? LL_RCC_ADC_CLKSOURCE_SYSCLK : LL_RCC_ADC_CLKSOURCE_NONE);
- #endif /* RCC_CCIPR_ADCSEL */
- }
- #if defined(SWPMI1)
- /**
- * @brief Get SWPMIx clock source
- * @rmtoll CCIPR SWPMI1SEL LL_RCC_GetSWPMIClockSource
- * @param SPWMIx This parameter can be one of the following values:
- * @arg @ref LL_RCC_SWPMI1_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_SWPMI1_CLKSOURCE_PCLK1
- * @arg @ref LL_RCC_SWPMI1_CLKSOURCE_HSI
- */
- __STATIC_INLINE uint32_t LL_RCC_GetSWPMIClockSource(uint32_t SPWMIx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR, SPWMIx));
- }
- #endif /* SWPMI1 */
- #if defined(DFSDM1_Channel0)
- #if defined(RCC_CCIPR2_ADFSDM1SEL)
- /**
- * @brief Get DFSDM Audio Clock Source
- * @rmtoll CCIPR2 ADFSDM1SEL LL_RCC_GetDFSDMAudioClockSource
- * @param DFSDMx This parameter can be one of the following values:
- * @arg @ref LL_RCC_DFSDM1_AUDIO_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_DFSDM1_AUDIO_CLKSOURCE_SAI1
- * @arg @ref LL_RCC_DFSDM1_AUDIO_CLKSOURCE_HSI
- * @arg @ref LL_RCC_DFSDM1_AUDIO_CLKSOURCE_MSI
- */
- __STATIC_INLINE uint32_t LL_RCC_GetDFSDMAudioClockSource(uint32_t DFSDMx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR2, DFSDMx));
- }
- #endif /* RCC_CCIPR2_ADFSDM1SEL */
- /**
- * @brief Get DFSDMx Kernel clock source
- @if STM32L4S9xx
- * @rmtoll CCIPR2 DFSDM1SEL LL_RCC_GetDFSDMClockSource
- @else
- * @rmtoll CCIPR DFSDM1SEL LL_RCC_GetDFSDMClockSource
- @endif
- * @param DFSDMx This parameter can be one of the following values:
- * @arg @ref LL_RCC_DFSDM1_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_DFSDM1_CLKSOURCE_PCLK2
- * @arg @ref LL_RCC_DFSDM1_CLKSOURCE_SYSCLK
- */
- __STATIC_INLINE uint32_t LL_RCC_GetDFSDMClockSource(uint32_t DFSDMx)
- {
- #if defined(RCC_CCIPR2_DFSDM1SEL)
- return (uint32_t)(READ_BIT(RCC->CCIPR2, DFSDMx));
- #else
- return (uint32_t)(READ_BIT(RCC->CCIPR, DFSDMx));
- #endif /* RCC_CCIPR2_DFSDM1SEL */
- }
- #endif /* DFSDM1_Channel0 */
- #if defined(DSI)
- /**
- * @brief Get DSI Clock Source
- * @rmtoll CCIPR2 DSISEL LL_RCC_GetDSIClockSource
- * @param DSIx This parameter can be one of the following values:
- * @arg @ref LL_RCC_DSI_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_DSI_CLKSOURCE_PHY
- * @arg @ref LL_RCC_DSI_CLKSOURCE_PLL
- */
- __STATIC_INLINE uint32_t LL_RCC_GetDSIClockSource(uint32_t DSIx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR2, DSIx));
- }
- #endif /* DSI */
- #if defined(LTDC)
- /**
- * @brief Get LTDC Clock Source
- * @rmtoll CCIPR2 PLLSAI2DIVR LL_RCC_GetLTDCClockSource
- * @param LTDCx This parameter can be one of the following values:
- * @arg @ref LL_RCC_LTDC_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV2
- * @arg @ref LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV4
- * @arg @ref LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV8
- * @arg @ref LL_RCC_LTDC_CLKSOURCE_PLLSAI2R_DIV16
- */
- __STATIC_INLINE uint32_t LL_RCC_GetLTDCClockSource(uint32_t LTDCx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR2, LTDCx));
- }
- #endif /* LTDC */
- #if defined(OCTOSPI1)
- /**
- * @brief Get OCTOSPI clock source
- * @rmtoll CCIPR2 OSPISEL LL_RCC_GetOCTOSPIClockSource
- * @param OCTOSPIx This parameter can be one of the following values:
- * @arg @ref LL_RCC_OCTOSPI_CLKSOURCE
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_OCTOSPI_CLKSOURCE_SYSCLK
- * @arg @ref LL_RCC_OCTOSPI_CLKSOURCE_MSI
- * @arg @ref LL_RCC_OCTOSPI_CLKSOURCE_PLL
- */
- __STATIC_INLINE uint32_t LL_RCC_GetOCTOSPIClockSource(uint32_t OCTOSPIx)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR2, OCTOSPIx));
- }
- #endif /* OCTOSPI1 */
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_RTC RTC
- * @{
- */
- /**
- * @brief Set RTC Clock Source
- * @note Once the RTC clock source has been selected, it cannot be changed anymore unless
- * the Backup domain is reset, or unless a failure is detected on LSE (LSECSSD is
- * set). The BDRST bit can be used to reset them.
- * @rmtoll BDCR RTCSEL LL_RCC_SetRTCClockSource
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_RTC_CLKSOURCE_NONE
- * @arg @ref LL_RCC_RTC_CLKSOURCE_LSE
- * @arg @ref LL_RCC_RTC_CLKSOURCE_LSI
- * @arg @ref LL_RCC_RTC_CLKSOURCE_HSE_DIV32
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_SetRTCClockSource(uint32_t Source)
- {
- MODIFY_REG(RCC->BDCR, RCC_BDCR_RTCSEL, Source);
- }
- /**
- * @brief Get RTC Clock Source
- * @rmtoll BDCR RTCSEL LL_RCC_GetRTCClockSource
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_RTC_CLKSOURCE_NONE
- * @arg @ref LL_RCC_RTC_CLKSOURCE_LSE
- * @arg @ref LL_RCC_RTC_CLKSOURCE_LSI
- * @arg @ref LL_RCC_RTC_CLKSOURCE_HSE_DIV32
- */
- __STATIC_INLINE uint32_t LL_RCC_GetRTCClockSource(void)
- {
- return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_RTCSEL));
- }
- /**
- * @brief Enable RTC
- * @rmtoll BDCR RTCEN LL_RCC_EnableRTC
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableRTC(void)
- {
- SET_BIT(RCC->BDCR, RCC_BDCR_RTCEN);
- }
- /**
- * @brief Disable RTC
- * @rmtoll BDCR RTCEN LL_RCC_DisableRTC
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableRTC(void)
- {
- CLEAR_BIT(RCC->BDCR, RCC_BDCR_RTCEN);
- }
- /**
- * @brief Check if RTC has been enabled or not
- * @rmtoll BDCR RTCEN LL_RCC_IsEnabledRTC
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledRTC(void)
- {
- return ((READ_BIT(RCC->BDCR, RCC_BDCR_RTCEN) == RCC_BDCR_RTCEN) ? 1UL : 0UL);
- }
- /**
- * @brief Force the Backup domain reset
- * @rmtoll BDCR BDRST LL_RCC_ForceBackupDomainReset
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ForceBackupDomainReset(void)
- {
- SET_BIT(RCC->BDCR, RCC_BDCR_BDRST);
- }
- /**
- * @brief Release the Backup domain reset
- * @rmtoll BDCR BDRST LL_RCC_ReleaseBackupDomainReset
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ReleaseBackupDomainReset(void)
- {
- CLEAR_BIT(RCC->BDCR, RCC_BDCR_BDRST);
- }
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_PLL PLL
- * @{
- */
- /**
- * @brief Enable PLL
- * @rmtoll CR PLLON LL_RCC_PLL_Enable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_Enable(void)
- {
- SET_BIT(RCC->CR, RCC_CR_PLLON);
- }
- /**
- * @brief Disable PLL
- * @note Cannot be disabled if the PLL clock is used as the system clock
- * @rmtoll CR PLLON LL_RCC_PLL_Disable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_Disable(void)
- {
- CLEAR_BIT(RCC->CR, RCC_CR_PLLON);
- }
- /**
- * @brief Check if PLL Ready
- * @rmtoll CR PLLRDY LL_RCC_PLL_IsReady
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_IsReady(void)
- {
- return ((READ_BIT(RCC->CR, RCC_CR_PLLRDY) == RCC_CR_PLLRDY) ? 1UL : 0UL);
- }
- /**
- * @brief Configure PLL used for SYSCLK Domain
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLN/PLLR can be written only when PLL is disabled.
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_ConfigDomain_SYS\n
- * PLLCFGR PLLM LL_RCC_PLL_ConfigDomain_SYS\n
- * PLLCFGR PLLN LL_RCC_PLL_ConfigDomain_SYS\n
- * PLLCFGR PLLR LL_RCC_PLL_ConfigDomain_SYS
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @arg @ref LL_RCC_PLLM_DIV_9 (*)
- * @arg @ref LL_RCC_PLLM_DIV_10 (*)
- * @arg @ref LL_RCC_PLLM_DIV_11 (*)
- * @arg @ref LL_RCC_PLLM_DIV_12 (*)
- * @arg @ref LL_RCC_PLLM_DIV_13 (*)
- * @arg @ref LL_RCC_PLLM_DIV_14 (*)
- * @arg @ref LL_RCC_PLLM_DIV_15 (*)
- * @arg @ref LL_RCC_PLLM_DIV_16 (*)
- *
- * (*) value not defined in all devices.
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLR This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLR_DIV_2
- * @arg @ref LL_RCC_PLLR_DIV_4
- * @arg @ref LL_RCC_PLLR_DIV_6
- * @arg @ref LL_RCC_PLLR_DIV_8
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SYS(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLR,
- Source | PLLM | (PLLN << RCC_PLLCFGR_PLLN_Pos) | PLLR);
- }
- #if defined(RCC_PLLP_SUPPORT)
- #if defined(RCC_PLLP_DIV_2_31_SUPPORT)
- /**
- * @brief Configure PLL used for SAI domain clock
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLN/PLLP can be written only when PLL is disabled.
- * @note This can be selected for SAI1 or SAI2 (*)
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_ConfigDomain_SAI\n
- * PLLCFGR PLLM LL_RCC_PLL_ConfigDomain_SAI\n
- * PLLCFGR PLLN LL_RCC_PLL_ConfigDomain_SAI\n
- * PLLCFGR PLLPDIV LL_RCC_PLL_ConfigDomain_SAI
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @arg @ref LL_RCC_PLLM_DIV_9 (*)
- * @arg @ref LL_RCC_PLLM_DIV_10 (*)
- * @arg @ref LL_RCC_PLLM_DIV_11 (*)
- * @arg @ref LL_RCC_PLLM_DIV_12 (*)
- * @arg @ref LL_RCC_PLLM_DIV_13 (*)
- * @arg @ref LL_RCC_PLLM_DIV_14 (*)
- * @arg @ref LL_RCC_PLLM_DIV_15 (*)
- * @arg @ref LL_RCC_PLLM_DIV_16 (*)
- *
- * (*) value not defined in all devices.
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLP This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLP_DIV_2
- * @arg @ref LL_RCC_PLLP_DIV_3
- * @arg @ref LL_RCC_PLLP_DIV_4
- * @arg @ref LL_RCC_PLLP_DIV_5
- * @arg @ref LL_RCC_PLLP_DIV_6
- * @arg @ref LL_RCC_PLLP_DIV_7
- * @arg @ref LL_RCC_PLLP_DIV_8
- * @arg @ref LL_RCC_PLLP_DIV_9
- * @arg @ref LL_RCC_PLLP_DIV_10
- * @arg @ref LL_RCC_PLLP_DIV_11
- * @arg @ref LL_RCC_PLLP_DIV_12
- * @arg @ref LL_RCC_PLLP_DIV_13
- * @arg @ref LL_RCC_PLLP_DIV_14
- * @arg @ref LL_RCC_PLLP_DIV_15
- * @arg @ref LL_RCC_PLLP_DIV_16
- * @arg @ref LL_RCC_PLLP_DIV_17
- * @arg @ref LL_RCC_PLLP_DIV_18
- * @arg @ref LL_RCC_PLLP_DIV_19
- * @arg @ref LL_RCC_PLLP_DIV_20
- * @arg @ref LL_RCC_PLLP_DIV_21
- * @arg @ref LL_RCC_PLLP_DIV_22
- * @arg @ref LL_RCC_PLLP_DIV_23
- * @arg @ref LL_RCC_PLLP_DIV_24
- * @arg @ref LL_RCC_PLLP_DIV_25
- * @arg @ref LL_RCC_PLLP_DIV_26
- * @arg @ref LL_RCC_PLLP_DIV_27
- * @arg @ref LL_RCC_PLLP_DIV_28
- * @arg @ref LL_RCC_PLLP_DIV_29
- * @arg @ref LL_RCC_PLLP_DIV_30
- * @arg @ref LL_RCC_PLLP_DIV_31
- * @retval None
- */
- #else
- /**
- * @brief Configure PLL used for SAI domain clock
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLN/PLLP can be written only when PLL is disabled.
- * @note This can be selected for SAI1 or SAI2 (*)
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_ConfigDomain_SAI\n
- * PLLCFGR PLLM LL_RCC_PLL_ConfigDomain_SAI\n
- * PLLCFGR PLLN LL_RCC_PLL_ConfigDomain_SAI\n
- * PLLCFGR PLLP LL_RCC_PLL_ConfigDomain_SAI
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param PLLN Between 8 and 86
- * @param PLLP This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLP_DIV_7
- * @arg @ref LL_RCC_PLLP_DIV_17
- * @retval None
- */
- #endif /* RCC_PLLP_DIV_2_31_SUPPORT */
- __STATIC_INLINE void LL_RCC_PLL_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP)
- {
- #if defined(RCC_PLLP_DIV_2_31_SUPPORT)
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLPDIV,
- Source | PLLM | (PLLN << RCC_PLLCFGR_PLLN_Pos) | PLLP);
- #else
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLP,
- Source | PLLM | (PLLN << RCC_PLLCFGR_PLLN_Pos) | PLLP);
- #endif /* RCC_PLLP_DIV_2_31_SUPPORT */
- }
- #endif /* RCC_PLLP_SUPPORT */
- /**
- * @brief Configure PLL used for 48Mhz domain clock
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLN/PLLQ can be written only when PLL is disabled.
- * @note This can be selected for USB, RNG, SDMMC
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_ConfigDomain_48M\n
- * PLLCFGR PLLM LL_RCC_PLL_ConfigDomain_48M\n
- * PLLCFGR PLLN LL_RCC_PLL_ConfigDomain_48M\n
- * PLLCFGR PLLQ LL_RCC_PLL_ConfigDomain_48M
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @arg @ref LL_RCC_PLLM_DIV_9 (*)
- * @arg @ref LL_RCC_PLLM_DIV_10 (*)
- * @arg @ref LL_RCC_PLLM_DIV_11 (*)
- * @arg @ref LL_RCC_PLLM_DIV_12 (*)
- * @arg @ref LL_RCC_PLLM_DIV_13 (*)
- * @arg @ref LL_RCC_PLLM_DIV_14 (*)
- * @arg @ref LL_RCC_PLLM_DIV_15 (*)
- * @arg @ref LL_RCC_PLLM_DIV_16 (*)
- *
- * (*) value not defined in all devices.
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLQ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLQ_DIV_2
- * @arg @ref LL_RCC_PLLQ_DIV_4
- * @arg @ref LL_RCC_PLLQ_DIV_6
- * @arg @ref LL_RCC_PLLQ_DIV_8
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_ConfigDomain_48M(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLQ)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM | RCC_PLLCFGR_PLLN | RCC_PLLCFGR_PLLQ,
- Source | PLLM | (PLLN << RCC_PLLCFGR_PLLN_Pos) | PLLQ);
- }
- /**
- * @brief Configure PLL clock source
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_SetMainSource
- * @param PLLSource This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_SetMainSource(uint32_t PLLSource)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, PLLSource);
- }
- /**
- * @brief Get the oscillator used as PLL clock source.
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLL_GetMainSource
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_GetMainSource(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC));
- }
- /**
- * @brief Get Main PLL multiplication factor for VCO
- * @rmtoll PLLCFGR PLLN LL_RCC_PLL_GetN
- * @retval Between 8 and 86 or 127 depending on devices
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_GetN(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos);
- }
- #if defined(RCC_PLLP_SUPPORT)
- #if defined(RCC_PLLP_DIV_2_31_SUPPORT)
- /**
- * @brief Get Main PLL division factor for PLLP
- * @note Used for PLLSAI3CLK (SAI1 and SAI2 clock)
- * @rmtoll PLLCFGR PLLPDIV LL_RCC_PLL_GetP
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLP_DIV_2
- * @arg @ref LL_RCC_PLLP_DIV_3
- * @arg @ref LL_RCC_PLLP_DIV_4
- * @arg @ref LL_RCC_PLLP_DIV_5
- * @arg @ref LL_RCC_PLLP_DIV_6
- * @arg @ref LL_RCC_PLLP_DIV_7
- * @arg @ref LL_RCC_PLLP_DIV_8
- * @arg @ref LL_RCC_PLLP_DIV_9
- * @arg @ref LL_RCC_PLLP_DIV_10
- * @arg @ref LL_RCC_PLLP_DIV_11
- * @arg @ref LL_RCC_PLLP_DIV_12
- * @arg @ref LL_RCC_PLLP_DIV_13
- * @arg @ref LL_RCC_PLLP_DIV_14
- * @arg @ref LL_RCC_PLLP_DIV_15
- * @arg @ref LL_RCC_PLLP_DIV_16
- * @arg @ref LL_RCC_PLLP_DIV_17
- * @arg @ref LL_RCC_PLLP_DIV_18
- * @arg @ref LL_RCC_PLLP_DIV_19
- * @arg @ref LL_RCC_PLLP_DIV_20
- * @arg @ref LL_RCC_PLLP_DIV_21
- * @arg @ref LL_RCC_PLLP_DIV_22
- * @arg @ref LL_RCC_PLLP_DIV_23
- * @arg @ref LL_RCC_PLLP_DIV_24
- * @arg @ref LL_RCC_PLLP_DIV_25
- * @arg @ref LL_RCC_PLLP_DIV_26
- * @arg @ref LL_RCC_PLLP_DIV_27
- * @arg @ref LL_RCC_PLLP_DIV_28
- * @arg @ref LL_RCC_PLLP_DIV_29
- * @arg @ref LL_RCC_PLLP_DIV_30
- * @arg @ref LL_RCC_PLLP_DIV_31
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_GetP(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLPDIV));
- }
- #else
- /**
- * @brief Get Main PLL division factor for PLLP
- * @note Used for PLLSAI3CLK (SAI1 and SAI2 clock)
- * @rmtoll PLLCFGR PLLP LL_RCC_PLL_GetP
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLP_DIV_7
- * @arg @ref LL_RCC_PLLP_DIV_17
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_GetP(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLP));
- }
- #endif /* RCC_PLLP_DIV_2_31_SUPPORT */
- #endif /* RCC_PLLP_SUPPORT */
- /**
- * @brief Get Main PLL division factor for PLLQ
- * @note Used for PLL48M1CLK selected for USB, RNG, SDMMC (48 MHz clock)
- * @rmtoll PLLCFGR PLLQ LL_RCC_PLL_GetQ
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLQ_DIV_2
- * @arg @ref LL_RCC_PLLQ_DIV_4
- * @arg @ref LL_RCC_PLLQ_DIV_6
- * @arg @ref LL_RCC_PLLQ_DIV_8
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_GetQ(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLQ));
- }
- /**
- * @brief Get Main PLL division factor for PLLR
- * @note Used for PLLCLK (system clock)
- * @rmtoll PLLCFGR PLLR LL_RCC_PLL_GetR
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLR_DIV_2
- * @arg @ref LL_RCC_PLLR_DIV_4
- * @arg @ref LL_RCC_PLLR_DIV_6
- * @arg @ref LL_RCC_PLLR_DIV_8
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_GetR(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLR));
- }
- /**
- * @brief Get Division factor for the main PLL and other PLL
- * @rmtoll PLLCFGR PLLM LL_RCC_PLL_GetDivider
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @arg @ref LL_RCC_PLLM_DIV_9 (*)
- * @arg @ref LL_RCC_PLLM_DIV_10 (*)
- * @arg @ref LL_RCC_PLLM_DIV_11 (*)
- * @arg @ref LL_RCC_PLLM_DIV_12 (*)
- * @arg @ref LL_RCC_PLLM_DIV_13 (*)
- * @arg @ref LL_RCC_PLLM_DIV_14 (*)
- * @arg @ref LL_RCC_PLLM_DIV_15 (*)
- * @arg @ref LL_RCC_PLLM_DIV_16 (*)
- *
- * (*) value not defined in all devices.
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_GetDivider(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLM));
- }
- #if defined(RCC_PLLP_SUPPORT)
- /**
- * @brief Enable PLL output mapped on SAI domain clock
- * @rmtoll PLLCFGR PLLPEN LL_RCC_PLL_EnableDomain_SAI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_EnableDomain_SAI(void)
- {
- SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLPEN);
- }
- /**
- * @brief Disable PLL output mapped on SAI domain clock
- * @note Cannot be disabled if the PLL clock is used as the system
- * clock
- * @note In order to save power, when the PLLCLK of the PLL is
- * not used, should be 0
- * @rmtoll PLLCFGR PLLPEN LL_RCC_PLL_DisableDomain_SAI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_DisableDomain_SAI(void)
- {
- CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLPEN);
- }
- /**
- * @brief Check if PLL output mapped on SAI domain clock is enabled
- * @rmtoll PLLCFGR PLLPEN LL_RCC_PLL_IsEnabledDomain_SAI
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_IsEnabledDomain_SAI(void)
- {
- return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLPEN) == (RCC_PLLCFGR_PLLPEN)) ? 1UL : 0UL);
- }
- #endif /* RCC_PLLP_SUPPORT */
- /**
- * @brief Enable PLL output mapped on 48MHz domain clock
- * @rmtoll PLLCFGR PLLQEN LL_RCC_PLL_EnableDomain_48M
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_EnableDomain_48M(void)
- {
- SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLQEN);
- }
- /**
- * @brief Disable PLL output mapped on 48MHz domain clock
- * @note Cannot be disabled if the PLL clock is used as the system
- * clock
- * @note In order to save power, when the PLLCLK of the PLL is
- * not used, should be 0
- * @rmtoll PLLCFGR PLLQEN LL_RCC_PLL_DisableDomain_48M
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_DisableDomain_48M(void)
- {
- CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLQEN);
- }
- /**
- * @brief Check if PLL output mapped on 48MHz domain clock is enabled
- * @rmtoll PLLCFGR PLLQEN LL_RCC_PLL_IsEnabledDomain_48M
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_IsEnabledDomain_48M(void)
- {
- return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLQEN) == (RCC_PLLCFGR_PLLQEN)) ? 1UL : 0UL);
- }
- /**
- * @brief Enable PLL output mapped on SYSCLK domain
- * @rmtoll PLLCFGR PLLREN LL_RCC_PLL_EnableDomain_SYS
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_EnableDomain_SYS(void)
- {
- SET_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLREN);
- }
- /**
- * @brief Disable PLL output mapped on SYSCLK domain
- * @note Cannot be disabled if the PLL clock is used as the system
- * clock
- * @note In order to save power, when the PLLCLK of the PLL is
- * not used, Main PLL should be 0
- * @rmtoll PLLCFGR PLLREN LL_RCC_PLL_DisableDomain_SYS
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLL_DisableDomain_SYS(void)
- {
- CLEAR_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLREN);
- }
- /**
- * @brief Check if PLL output mapped on SYSCLK domain clock is enabled
- * @rmtoll PLLCFGR PLLREN LL_RCC_PLL_IsEnabledDomain_SYS
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLL_IsEnabledDomain_SYS(void)
- {
- return ((READ_BIT(RCC->PLLCFGR, RCC_PLLCFGR_PLLREN) == (RCC_PLLCFGR_PLLREN)) ? 1UL : 0UL);
- }
- /**
- * @}
- */
- #if defined(RCC_PLLSAI1_SUPPORT)
- /** @defgroup RCC_LL_EF_PLLSAI1 PLLSAI1
- * @{
- */
- /**
- * @brief Enable PLLSAI1
- * @rmtoll CR PLLSAI1ON LL_RCC_PLLSAI1_Enable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_Enable(void)
- {
- SET_BIT(RCC->CR, RCC_CR_PLLSAI1ON);
- }
- /**
- * @brief Disable PLLSAI1
- * @rmtoll CR PLLSAI1ON LL_RCC_PLLSAI1_Disable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_Disable(void)
- {
- CLEAR_BIT(RCC->CR, RCC_CR_PLLSAI1ON);
- }
- /**
- * @brief Check if PLLSAI1 Ready
- * @rmtoll CR PLLSAI1RDY LL_RCC_PLLSAI1_IsReady
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI1_IsReady(void)
- {
- return ((READ_BIT(RCC->CR, RCC_CR_PLLSAI1RDY) == RCC_CR_PLLSAI1RDY) ? 1UL : 0UL);
- }
- #if defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT)
- /**
- * @brief Configure PLLSAI1 used for 48Mhz domain clock
- * @note PLL Source can be written only when PLL, PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLSAI1M/PLLSAI1N/PLLSAI1Q can be written only when PLLSAI1 is disabled.
- * @note This can be selected for USB, RNG, SDMMC
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI1_ConfigDomain_48M\n
- * PLLSAI1CFGR PLLSAI1M LL_RCC_PLLSAI1_ConfigDomain_48M\n
- * PLLSAI1CFGR PLLSAI1N LL_RCC_PLLSAI1_ConfigDomain_48M\n
- * PLLSAI1CFGR PLLSAI1Q LL_RCC_PLLSAI1_ConfigDomain_48M
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1M_DIV_1
- * @arg @ref LL_RCC_PLLSAI1M_DIV_2
- * @arg @ref LL_RCC_PLLSAI1M_DIV_3
- * @arg @ref LL_RCC_PLLSAI1M_DIV_4
- * @arg @ref LL_RCC_PLLSAI1M_DIV_5
- * @arg @ref LL_RCC_PLLSAI1M_DIV_6
- * @arg @ref LL_RCC_PLLSAI1M_DIV_7
- * @arg @ref LL_RCC_PLLSAI1M_DIV_8
- * @arg @ref LL_RCC_PLLSAI1M_DIV_9
- * @arg @ref LL_RCC_PLLSAI1M_DIV_10
- * @arg @ref LL_RCC_PLLSAI1M_DIV_11
- * @arg @ref LL_RCC_PLLSAI1M_DIV_12
- * @arg @ref LL_RCC_PLLSAI1M_DIV_13
- * @arg @ref LL_RCC_PLLSAI1M_DIV_14
- * @arg @ref LL_RCC_PLLSAI1M_DIV_15
- * @arg @ref LL_RCC_PLLSAI1M_DIV_16
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLQ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_2
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_4
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_6
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_8
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_ConfigDomain_48M(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLQ)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, Source);
- MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1M | RCC_PLLSAI1CFGR_PLLSAI1N | RCC_PLLSAI1CFGR_PLLSAI1Q,
- PLLM | (PLLN << RCC_PLLSAI1CFGR_PLLSAI1N_Pos) | PLLQ);
- }
- #else
- /**
- * @brief Configure PLLSAI1 used for 48Mhz domain clock
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLSAI1N/PLLSAI1Q can be written only when PLLSAI1 is disabled.
- * @note This can be selected for USB, RNG, SDMMC
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI1_ConfigDomain_48M\n
- * PLLCFGR PLLM LL_RCC_PLLSAI1_ConfigDomain_48M\n
- * PLLSAI1CFGR PLLSAI1N LL_RCC_PLLSAI1_ConfigDomain_48M\n
- * PLLSAI1CFGR PLLSAI1Q LL_RCC_PLLSAI1_ConfigDomain_48M
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLQ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_2
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_4
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_6
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_8
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_ConfigDomain_48M(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLQ)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM);
- MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1N | RCC_PLLSAI1CFGR_PLLSAI1Q, PLLN << RCC_PLLSAI1CFGR_PLLSAI1N_Pos | PLLQ);
- }
- #endif /* RCC_PLLSAI1M_DIV_1_16_SUPPORT */
- #if defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT) && defined(RCC_PLLSAI1P_DIV_2_31_SUPPORT)
- /**
- * @brief Configure PLLSAI1 used for SAI domain clock
- * @note PLL Source can be written only when PLL, PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLSAI1M/PLLSAI1N/PLLSAI1PDIV can be written only when PLLSAI1 is disabled.
- * @note This can be selected for SAI1 or SAI2
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI1_ConfigDomain_SAI\n
- * PLLSAI1CFGR PLLSAI1M LL_RCC_PLLSAI1_ConfigDomain_SAI\n
- * PLLSAI1CFGR PLLSAI1N LL_RCC_PLLSAI1_ConfigDomain_SAI\n
- * PLLSAI1CFGR PLLSAI1PDIV LL_RCC_PLLSAI1_ConfigDomain_SAI
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1M_DIV_1
- * @arg @ref LL_RCC_PLLSAI1M_DIV_2
- * @arg @ref LL_RCC_PLLSAI1M_DIV_3
- * @arg @ref LL_RCC_PLLSAI1M_DIV_4
- * @arg @ref LL_RCC_PLLSAI1M_DIV_5
- * @arg @ref LL_RCC_PLLSAI1M_DIV_6
- * @arg @ref LL_RCC_PLLSAI1M_DIV_7
- * @arg @ref LL_RCC_PLLSAI1M_DIV_8
- * @arg @ref LL_RCC_PLLSAI1M_DIV_9
- * @arg @ref LL_RCC_PLLSAI1M_DIV_10
- * @arg @ref LL_RCC_PLLSAI1M_DIV_11
- * @arg @ref LL_RCC_PLLSAI1M_DIV_12
- * @arg @ref LL_RCC_PLLSAI1M_DIV_13
- * @arg @ref LL_RCC_PLLSAI1M_DIV_14
- * @arg @ref LL_RCC_PLLSAI1M_DIV_15
- * @arg @ref LL_RCC_PLLSAI1M_DIV_16
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLP This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1P_DIV_2
- * @arg @ref LL_RCC_PLLSAI1P_DIV_3
- * @arg @ref LL_RCC_PLLSAI1P_DIV_4
- * @arg @ref LL_RCC_PLLSAI1P_DIV_5
- * @arg @ref LL_RCC_PLLSAI1P_DIV_6
- * @arg @ref LL_RCC_PLLSAI1P_DIV_7
- * @arg @ref LL_RCC_PLLSAI1P_DIV_8
- * @arg @ref LL_RCC_PLLSAI1P_DIV_9
- * @arg @ref LL_RCC_PLLSAI1P_DIV_10
- * @arg @ref LL_RCC_PLLSAI1P_DIV_11
- * @arg @ref LL_RCC_PLLSAI1P_DIV_12
- * @arg @ref LL_RCC_PLLSAI1P_DIV_13
- * @arg @ref LL_RCC_PLLSAI1P_DIV_14
- * @arg @ref LL_RCC_PLLSAI1P_DIV_15
- * @arg @ref LL_RCC_PLLSAI1P_DIV_16
- * @arg @ref LL_RCC_PLLSAI1P_DIV_17
- * @arg @ref LL_RCC_PLLSAI1P_DIV_18
- * @arg @ref LL_RCC_PLLSAI1P_DIV_19
- * @arg @ref LL_RCC_PLLSAI1P_DIV_20
- * @arg @ref LL_RCC_PLLSAI1P_DIV_21
- * @arg @ref LL_RCC_PLLSAI1P_DIV_22
- * @arg @ref LL_RCC_PLLSAI1P_DIV_23
- * @arg @ref LL_RCC_PLLSAI1P_DIV_24
- * @arg @ref LL_RCC_PLLSAI1P_DIV_25
- * @arg @ref LL_RCC_PLLSAI1P_DIV_26
- * @arg @ref LL_RCC_PLLSAI1P_DIV_27
- * @arg @ref LL_RCC_PLLSAI1P_DIV_28
- * @arg @ref LL_RCC_PLLSAI1P_DIV_29
- * @arg @ref LL_RCC_PLLSAI1P_DIV_30
- * @arg @ref LL_RCC_PLLSAI1P_DIV_31
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, Source);
- MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1M | RCC_PLLSAI1CFGR_PLLSAI1N | RCC_PLLSAI1CFGR_PLLSAI1PDIV,
- PLLM | (PLLN << RCC_PLLSAI1CFGR_PLLSAI1N_Pos) | PLLP);
- }
- #elif defined(RCC_PLLSAI1P_DIV_2_31_SUPPORT)
- /**
- * @brief Configure PLLSAI1 used for SAI domain clock
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLSAI1N/PLLSAI1PDIV can be written only when PLLSAI1 is disabled.
- * @note This can be selected for SAI1 or SAI2 (*)
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI1_ConfigDomain_SAI\n
- * PLLCFGR PLLM LL_RCC_PLLSAI1_ConfigDomain_SAI\n
- * PLLSAI1CFGR PLLSAI1N LL_RCC_PLLSAI1_ConfigDomain_SAI\n
- * PLLSAI1CFGR PLLSAI1PDIV LL_RCC_PLLSAI1_ConfigDomain_SAI
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLP This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1P_DIV_2
- * @arg @ref LL_RCC_PLLSAI1P_DIV_3
- * @arg @ref LL_RCC_PLLSAI1P_DIV_4
- * @arg @ref LL_RCC_PLLSAI1P_DIV_5
- * @arg @ref LL_RCC_PLLSAI1P_DIV_6
- * @arg @ref LL_RCC_PLLSAI1P_DIV_7
- * @arg @ref LL_RCC_PLLSAI1P_DIV_8
- * @arg @ref LL_RCC_PLLSAI1P_DIV_9
- * @arg @ref LL_RCC_PLLSAI1P_DIV_10
- * @arg @ref LL_RCC_PLLSAI1P_DIV_11
- * @arg @ref LL_RCC_PLLSAI1P_DIV_12
- * @arg @ref LL_RCC_PLLSAI1P_DIV_13
- * @arg @ref LL_RCC_PLLSAI1P_DIV_14
- * @arg @ref LL_RCC_PLLSAI1P_DIV_15
- * @arg @ref LL_RCC_PLLSAI1P_DIV_16
- * @arg @ref LL_RCC_PLLSAI1P_DIV_17
- * @arg @ref LL_RCC_PLLSAI1P_DIV_18
- * @arg @ref LL_RCC_PLLSAI1P_DIV_19
- * @arg @ref LL_RCC_PLLSAI1P_DIV_20
- * @arg @ref LL_RCC_PLLSAI1P_DIV_21
- * @arg @ref LL_RCC_PLLSAI1P_DIV_22
- * @arg @ref LL_RCC_PLLSAI1P_DIV_23
- * @arg @ref LL_RCC_PLLSAI1P_DIV_24
- * @arg @ref LL_RCC_PLLSAI1P_DIV_25
- * @arg @ref LL_RCC_PLLSAI1P_DIV_26
- * @arg @ref LL_RCC_PLLSAI1P_DIV_27
- * @arg @ref LL_RCC_PLLSAI1P_DIV_28
- * @arg @ref LL_RCC_PLLSAI1P_DIV_29
- * @arg @ref LL_RCC_PLLSAI1P_DIV_30
- * @arg @ref LL_RCC_PLLSAI1P_DIV_31
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM);
- MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1N | RCC_PLLSAI1CFGR_PLLSAI1PDIV,
- PLLN << RCC_PLLSAI1CFGR_PLLSAI1N_Pos | PLLP);
- }
- #else
- /**
- * @brief Configure PLLSAI1 used for SAI domain clock
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLSAI1N/PLLSAI1P can be written only when PLLSAI1 is disabled.
- * @note This can be selected for SAI1 or SAI2 (*)
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI1_ConfigDomain_SAI\n
- * PLLCFGR PLLM LL_RCC_PLLSAI1_ConfigDomain_SAI\n
- * PLLSAI1CFGR PLLSAI1N LL_RCC_PLLSAI1_ConfigDomain_SAI\n
- * PLLSAI1CFGR PLLSAI1P LL_RCC_PLLSAI1_ConfigDomain_SAI
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param PLLN Between 8 and 86
- * @param PLLP This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1P_DIV_7
- * @arg @ref LL_RCC_PLLSAI1P_DIV_17
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM);
- MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1N | RCC_PLLSAI1CFGR_PLLSAI1P, PLLN << RCC_PLLSAI1CFGR_PLLSAI1N_Pos | PLLP);
- }
- #endif /* RCC_PLLSAI1M_DIV_1_16_SUPPORT && RCC_PLLSAI1P_DIV_2_31_SUPPORT */
- #if defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT)
- /**
- * @brief Configure PLLSAI1 used for ADC domain clock
- * @note PLL Source can be written only when PLL, PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLSAI1M/PLLSAI1N/PLLSAI1R can be written only when PLLSAI1 is disabled.
- * @note This can be selected for ADC
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI1_ConfigDomain_ADC\n
- * PLLSAI1CFGR PLLSAI1M LL_RCC_PLLSAI1_ConfigDomain_ADC\n
- * PLLSAI1CFGR PLLSAI1N LL_RCC_PLLSAI1_ConfigDomain_ADC\n
- * PLLSAI1CFGR PLLSAI1R LL_RCC_PLLSAI1_ConfigDomain_ADC
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1M_DIV_1
- * @arg @ref LL_RCC_PLLSAI1M_DIV_2
- * @arg @ref LL_RCC_PLLSAI1M_DIV_3
- * @arg @ref LL_RCC_PLLSAI1M_DIV_4
- * @arg @ref LL_RCC_PLLSAI1M_DIV_5
- * @arg @ref LL_RCC_PLLSAI1M_DIV_6
- * @arg @ref LL_RCC_PLLSAI1M_DIV_7
- * @arg @ref LL_RCC_PLLSAI1M_DIV_8
- * @arg @ref LL_RCC_PLLSAI1M_DIV_9
- * @arg @ref LL_RCC_PLLSAI1M_DIV_10
- * @arg @ref LL_RCC_PLLSAI1M_DIV_11
- * @arg @ref LL_RCC_PLLSAI1M_DIV_12
- * @arg @ref LL_RCC_PLLSAI1M_DIV_13
- * @arg @ref LL_RCC_PLLSAI1M_DIV_14
- * @arg @ref LL_RCC_PLLSAI1M_DIV_15
- * @arg @ref LL_RCC_PLLSAI1M_DIV_16
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLR This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1R_DIV_2
- * @arg @ref LL_RCC_PLLSAI1R_DIV_4
- * @arg @ref LL_RCC_PLLSAI1R_DIV_6
- * @arg @ref LL_RCC_PLLSAI1R_DIV_8
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_ConfigDomain_ADC(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, Source);
- MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1M | RCC_PLLSAI1CFGR_PLLSAI1N | RCC_PLLSAI1CFGR_PLLSAI1R,
- PLLM | (PLLN << RCC_PLLSAI1CFGR_PLLSAI1N_Pos) | PLLR);
- }
- #else
- /**
- * @brief Configure PLLSAI1 used for ADC domain clock
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLN/PLLR can be written only when PLLSAI1 is disabled.
- * @note This can be selected for ADC
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI1_ConfigDomain_ADC\n
- * PLLCFGR PLLM LL_RCC_PLLSAI1_ConfigDomain_ADC\n
- * PLLSAI1CFGR PLLSAI1N LL_RCC_PLLSAI1_ConfigDomain_ADC\n
- * PLLSAI1CFGR PLLSAI1R LL_RCC_PLLSAI1_ConfigDomain_ADC
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLR This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1R_DIV_2
- * @arg @ref LL_RCC_PLLSAI1R_DIV_4
- * @arg @ref LL_RCC_PLLSAI1R_DIV_6
- * @arg @ref LL_RCC_PLLSAI1R_DIV_8
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_ConfigDomain_ADC(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM);
- MODIFY_REG(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1N | RCC_PLLSAI1CFGR_PLLSAI1R, PLLN << RCC_PLLSAI1CFGR_PLLSAI1N_Pos | PLLR);
- }
- #endif /* RCC_PLLSAI1M_DIV_1_16_SUPPORT */
- /**
- * @brief Get SAI1PLL multiplication factor for VCO
- * @rmtoll PLLSAI1CFGR PLLSAI1N LL_RCC_PLLSAI1_GetN
- * @retval Between 8 and 86 or 127 depending on devices
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI1_GetN(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1N) >> RCC_PLLSAI1CFGR_PLLSAI1N_Pos);
- }
- #if defined(RCC_PLLSAI1P_DIV_2_31_SUPPORT)
- /**
- * @brief Get SAI1PLL division factor for PLLSAI1P
- * @note Used for PLLSAI1CLK (SAI1 or SAI2 (*) clock).
- * @rmtoll PLLSAI1CFGR PLLSAI1PDIV LL_RCC_PLLSAI1_GetP
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1P_DIV_2
- * @arg @ref LL_RCC_PLLSAI1P_DIV_3
- * @arg @ref LL_RCC_PLLSAI1P_DIV_4
- * @arg @ref LL_RCC_PLLSAI1P_DIV_5
- * @arg @ref LL_RCC_PLLSAI1P_DIV_6
- * @arg @ref LL_RCC_PLLSAI1P_DIV_7
- * @arg @ref LL_RCC_PLLSAI1P_DIV_8
- * @arg @ref LL_RCC_PLLSAI1P_DIV_9
- * @arg @ref LL_RCC_PLLSAI1P_DIV_10
- * @arg @ref LL_RCC_PLLSAI1P_DIV_11
- * @arg @ref LL_RCC_PLLSAI1P_DIV_12
- * @arg @ref LL_RCC_PLLSAI1P_DIV_13
- * @arg @ref LL_RCC_PLLSAI1P_DIV_14
- * @arg @ref LL_RCC_PLLSAI1P_DIV_15
- * @arg @ref LL_RCC_PLLSAI1P_DIV_16
- * @arg @ref LL_RCC_PLLSAI1P_DIV_17
- * @arg @ref LL_RCC_PLLSAI1P_DIV_18
- * @arg @ref LL_RCC_PLLSAI1P_DIV_19
- * @arg @ref LL_RCC_PLLSAI1P_DIV_20
- * @arg @ref LL_RCC_PLLSAI1P_DIV_21
- * @arg @ref LL_RCC_PLLSAI1P_DIV_22
- * @arg @ref LL_RCC_PLLSAI1P_DIV_23
- * @arg @ref LL_RCC_PLLSAI1P_DIV_24
- * @arg @ref LL_RCC_PLLSAI1P_DIV_25
- * @arg @ref LL_RCC_PLLSAI1P_DIV_26
- * @arg @ref LL_RCC_PLLSAI1P_DIV_27
- * @arg @ref LL_RCC_PLLSAI1P_DIV_28
- * @arg @ref LL_RCC_PLLSAI1P_DIV_29
- * @arg @ref LL_RCC_PLLSAI1P_DIV_30
- * @arg @ref LL_RCC_PLLSAI1P_DIV_31
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI1_GetP(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1PDIV));
- }
- #else
- /**
- * @brief Get SAI1PLL division factor for PLLSAI1P
- * @note Used for PLLSAI1CLK (SAI1 or SAI2 (*) clock).
- * @rmtoll PLLSAI1CFGR PLLSAI1P LL_RCC_PLLSAI1_GetP
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1P_DIV_7
- * @arg @ref LL_RCC_PLLSAI1P_DIV_17
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI1_GetP(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1P));
- }
- #endif /* RCC_PLLSAI1P_DIV_2_31_SUPPORT */
- /**
- * @brief Get SAI1PLL division factor for PLLSAI1Q
- * @note Used PLL48M2CLK selected for USB, RNG, SDMMC (48 MHz clock)
- * @rmtoll PLLSAI1CFGR PLLSAI1Q LL_RCC_PLLSAI1_GetQ
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_2
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_4
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_6
- * @arg @ref LL_RCC_PLLSAI1Q_DIV_8
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI1_GetQ(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1Q));
- }
- /**
- * @brief Get PLLSAI1 division factor for PLLSAIR
- * @note Used for PLLADC1CLK (ADC clock)
- * @rmtoll PLLSAI1CFGR PLLSAI1R LL_RCC_PLLSAI1_GetR
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1R_DIV_2
- * @arg @ref LL_RCC_PLLSAI1R_DIV_4
- * @arg @ref LL_RCC_PLLSAI1R_DIV_6
- * @arg @ref LL_RCC_PLLSAI1R_DIV_8
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI1_GetR(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1R));
- }
- #if defined(RCC_PLLSAI1M_DIV_1_16_SUPPORT)
- /**
- * @brief Get Division factor for the PLLSAI1
- * @rmtoll PLLSAI1CFGR PLLSAI1M LL_RCC_PLLSAI1_GetDivider
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI1M_DIV_1
- * @arg @ref LL_RCC_PLLSAI1M_DIV_2
- * @arg @ref LL_RCC_PLLSAI1M_DIV_3
- * @arg @ref LL_RCC_PLLSAI1M_DIV_4
- * @arg @ref LL_RCC_PLLSAI1M_DIV_5
- * @arg @ref LL_RCC_PLLSAI1M_DIV_6
- * @arg @ref LL_RCC_PLLSAI1M_DIV_7
- * @arg @ref LL_RCC_PLLSAI1M_DIV_8
- * @arg @ref LL_RCC_PLLSAI1M_DIV_9
- * @arg @ref LL_RCC_PLLSAI1M_DIV_10
- * @arg @ref LL_RCC_PLLSAI1M_DIV_11
- * @arg @ref LL_RCC_PLLSAI1M_DIV_12
- * @arg @ref LL_RCC_PLLSAI1M_DIV_13
- * @arg @ref LL_RCC_PLLSAI1M_DIV_14
- * @arg @ref LL_RCC_PLLSAI1M_DIV_15
- * @arg @ref LL_RCC_PLLSAI1M_DIV_16
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI1_GetDivider(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1M));
- }
- #endif /* RCC_PLLSAI1M_DIV_1_16_SUPPORT */
- /**
- * @brief Enable PLLSAI1 output mapped on SAI domain clock
- * @rmtoll PLLSAI1CFGR PLLSAI1PEN LL_RCC_PLLSAI1_EnableDomain_SAI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_EnableDomain_SAI(void)
- {
- SET_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1PEN);
- }
- /**
- * @brief Disable PLLSAI1 output mapped on SAI domain clock
- * @note In order to save power, when of the PLLSAI1 is
- * not used, should be 0
- * @rmtoll PLLSAI1CFGR PLLSAI1PEN LL_RCC_PLLSAI1_DisableDomain_SAI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_DisableDomain_SAI(void)
- {
- CLEAR_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1PEN);
- }
- /**
- * @brief Check if PLLSAI1 output mapped on SAI domain clock is enabled
- * @rmtoll PLLSAI1CFGR PLLSAI1PEN LL_RCC_PLLSAI1_IsEnabledDomain_SAI
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI1_IsEnabledDomain_SAI(void)
- {
- return ((READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1PEN) == (RCC_PLLSAI1CFGR_PLLSAI1PEN)) ? 1UL : 0UL);
- }
- /**
- * @brief Enable PLLSAI1 output mapped on 48MHz domain clock
- * @rmtoll PLLSAI1CFGR PLLSAI1QEN LL_RCC_PLLSAI1_EnableDomain_48M
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_EnableDomain_48M(void)
- {
- SET_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1QEN);
- }
- /**
- * @brief Disable PLLSAI1 output mapped on 48MHz domain clock
- * @note In order to save power, when of the PLLSAI1 is
- * not used, should be 0
- * @rmtoll PLLSAI1CFGR PLLSAI1QEN LL_RCC_PLLSAI1_DisableDomain_48M
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_DisableDomain_48M(void)
- {
- CLEAR_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1QEN);
- }
- /**
- * @brief Check if PLLSAI1 output mapped on SAI domain clock is enabled
- * @rmtoll PLLSAI1CFGR PLLSAI1QEN LL_RCC_PLLSAI1_IsEnabledDomain_48M
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI1_IsEnabledDomain_48M(void)
- {
- return ((READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1QEN) == (RCC_PLLSAI1CFGR_PLLSAI1QEN)) ? 1UL : 0UL);
- }
- /**
- * @brief Enable PLLSAI1 output mapped on ADC domain clock
- * @rmtoll PLLSAI1CFGR PLLSAI1REN LL_RCC_PLLSAI1_EnableDomain_ADC
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_EnableDomain_ADC(void)
- {
- SET_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1REN);
- }
- /**
- * @brief Disable PLLSAI1 output mapped on ADC domain clock
- * @note In order to save power, when of the PLLSAI1 is
- * not used, Main PLLSAI1 should be 0
- * @rmtoll PLLSAI1CFGR PLLSAI1REN LL_RCC_PLLSAI1_DisableDomain_ADC
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI1_DisableDomain_ADC(void)
- {
- CLEAR_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1REN);
- }
- /**
- * @brief Check if PLLSAI1 output mapped on ADC domain clock is enabled
- * @rmtoll PLLSAI1CFGR PLLSAI1REN LL_RCC_PLLSAI1_IsEnabledDomain_ADC
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI1_IsEnabledDomain_ADC(void)
- {
- return ((READ_BIT(RCC->PLLSAI1CFGR, RCC_PLLSAI1CFGR_PLLSAI1REN) == (RCC_PLLSAI1CFGR_PLLSAI1REN)) ? 1UL : 0UL);
- }
- /**
- * @}
- */
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT)
- /** @defgroup RCC_LL_EF_PLLSAI2 PLLSAI2
- * @{
- */
- /**
- * @brief Enable PLLSAI2
- * @rmtoll CR PLLSAI2ON LL_RCC_PLLSAI2_Enable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_Enable(void)
- {
- SET_BIT(RCC->CR, RCC_CR_PLLSAI2ON);
- }
- /**
- * @brief Disable PLLSAI2
- * @rmtoll CR PLLSAI2ON LL_RCC_PLLSAI2_Disable
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_Disable(void)
- {
- CLEAR_BIT(RCC->CR, RCC_CR_PLLSAI2ON);
- }
- /**
- * @brief Check if PLLSAI2 Ready
- * @rmtoll CR PLLSAI2RDY LL_RCC_PLLSAI2_IsReady
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_IsReady(void)
- {
- return ((READ_BIT(RCC->CR, RCC_CR_PLLSAI2RDY) == RCC_CR_PLLSAI2RDY) ? 1UL : 0UL);
- }
- #if defined(RCC_PLLSAI2M_DIV_1_16_SUPPORT) && defined(RCC_PLLSAI2P_DIV_2_31_SUPPORT)
- /**
- * @brief Configure PLLSAI2 used for SAI domain clock
- * @note PLL Source can be written only when PLL, PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLSAI2M/PLLSAI2N/PLLSAI2PDIV can be written only when PLLSAI2 is disabled.
- * @note This can be selected for SAI1 or SAI2
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI2_ConfigDomain_SAI\n
- * PLLSAI2CFGR PLLSAI2M LL_RCC_PLLSAI2_ConfigDomain_SAI\n
- * PLLSAI2CFGR PLLSAI2N LL_RCC_PLLSAI2_ConfigDomain_SAI\n
- * PLLSAI2CFGR PLLSAI2PDIV LL_RCC_PLLSAI2_ConfigDomain_SAI
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2M_DIV_1
- * @arg @ref LL_RCC_PLLSAI2M_DIV_2
- * @arg @ref LL_RCC_PLLSAI2M_DIV_3
- * @arg @ref LL_RCC_PLLSAI2M_DIV_4
- * @arg @ref LL_RCC_PLLSAI2M_DIV_5
- * @arg @ref LL_RCC_PLLSAI2M_DIV_6
- * @arg @ref LL_RCC_PLLSAI2M_DIV_7
- * @arg @ref LL_RCC_PLLSAI2M_DIV_8
- * @arg @ref LL_RCC_PLLSAI2M_DIV_9
- * @arg @ref LL_RCC_PLLSAI2M_DIV_10
- * @arg @ref LL_RCC_PLLSAI2M_DIV_11
- * @arg @ref LL_RCC_PLLSAI2M_DIV_12
- * @arg @ref LL_RCC_PLLSAI2M_DIV_13
- * @arg @ref LL_RCC_PLLSAI2M_DIV_14
- * @arg @ref LL_RCC_PLLSAI2M_DIV_15
- * @arg @ref LL_RCC_PLLSAI2M_DIV_16
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLP This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2P_DIV_2
- * @arg @ref LL_RCC_PLLSAI2P_DIV_3
- * @arg @ref LL_RCC_PLLSAI2P_DIV_4
- * @arg @ref LL_RCC_PLLSAI2P_DIV_5
- * @arg @ref LL_RCC_PLLSAI2P_DIV_6
- * @arg @ref LL_RCC_PLLSAI2P_DIV_7
- * @arg @ref LL_RCC_PLLSAI2P_DIV_8
- * @arg @ref LL_RCC_PLLSAI2P_DIV_9
- * @arg @ref LL_RCC_PLLSAI2P_DIV_10
- * @arg @ref LL_RCC_PLLSAI2P_DIV_11
- * @arg @ref LL_RCC_PLLSAI2P_DIV_12
- * @arg @ref LL_RCC_PLLSAI2P_DIV_13
- * @arg @ref LL_RCC_PLLSAI2P_DIV_14
- * @arg @ref LL_RCC_PLLSAI2P_DIV_15
- * @arg @ref LL_RCC_PLLSAI2P_DIV_16
- * @arg @ref LL_RCC_PLLSAI2P_DIV_17
- * @arg @ref LL_RCC_PLLSAI2P_DIV_18
- * @arg @ref LL_RCC_PLLSAI2P_DIV_19
- * @arg @ref LL_RCC_PLLSAI2P_DIV_20
- * @arg @ref LL_RCC_PLLSAI2P_DIV_21
- * @arg @ref LL_RCC_PLLSAI2P_DIV_22
- * @arg @ref LL_RCC_PLLSAI2P_DIV_23
- * @arg @ref LL_RCC_PLLSAI2P_DIV_24
- * @arg @ref LL_RCC_PLLSAI2P_DIV_25
- * @arg @ref LL_RCC_PLLSAI2P_DIV_26
- * @arg @ref LL_RCC_PLLSAI2P_DIV_27
- * @arg @ref LL_RCC_PLLSAI2P_DIV_28
- * @arg @ref LL_RCC_PLLSAI2P_DIV_29
- * @arg @ref LL_RCC_PLLSAI2P_DIV_30
- * @arg @ref LL_RCC_PLLSAI2P_DIV_31
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, Source);
- MODIFY_REG(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2M | RCC_PLLSAI2CFGR_PLLSAI2N | RCC_PLLSAI2CFGR_PLLSAI2PDIV,
- PLLM | (PLLN << RCC_PLLSAI2CFGR_PLLSAI2N_Pos) | PLLP);
- }
- #elif defined(RCC_PLLSAI2P_DIV_2_31_SUPPORT)
- /**
- * @brief Configure PLLSAI2 used for SAI domain clock
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI1 and PLLSAI2 are disabled.
- * @note PLLSAI2N/PLLSAI2PDIV can be written only when PLLSAI2 is disabled.
- * @note This can be selected for SAI1 or SAI2
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI2_ConfigDomain_SAI\n
- * PLLCFGR PLLM LL_RCC_PLLSAI2_ConfigDomain_SAI\n
- * PLLSAI2CFGR PLLSAI2N LL_RCC_PLLSAI2_ConfigDomain_SAI\n
- * PLLSAI2CFGR PLLSAI2PDIV LL_RCC_PLLSAI2_ConfigDomain_SAI
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param PLLN Between 8 and 86 or 127 depending on devices
- * @param PLLP This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2P_DIV_2
- * @arg @ref LL_RCC_PLLSAI2P_DIV_3
- * @arg @ref LL_RCC_PLLSAI2P_DIV_4
- * @arg @ref LL_RCC_PLLSAI2P_DIV_5
- * @arg @ref LL_RCC_PLLSAI2P_DIV_6
- * @arg @ref LL_RCC_PLLSAI2P_DIV_7
- * @arg @ref LL_RCC_PLLSAI2P_DIV_8
- * @arg @ref LL_RCC_PLLSAI2P_DIV_9
- * @arg @ref LL_RCC_PLLSAI2P_DIV_10
- * @arg @ref LL_RCC_PLLSAI2P_DIV_11
- * @arg @ref LL_RCC_PLLSAI2P_DIV_12
- * @arg @ref LL_RCC_PLLSAI2P_DIV_13
- * @arg @ref LL_RCC_PLLSAI2P_DIV_14
- * @arg @ref LL_RCC_PLLSAI2P_DIV_15
- * @arg @ref LL_RCC_PLLSAI2P_DIV_16
- * @arg @ref LL_RCC_PLLSAI2P_DIV_17
- * @arg @ref LL_RCC_PLLSAI2P_DIV_18
- * @arg @ref LL_RCC_PLLSAI2P_DIV_19
- * @arg @ref LL_RCC_PLLSAI2P_DIV_20
- * @arg @ref LL_RCC_PLLSAI2P_DIV_21
- * @arg @ref LL_RCC_PLLSAI2P_DIV_22
- * @arg @ref LL_RCC_PLLSAI2P_DIV_23
- * @arg @ref LL_RCC_PLLSAI2P_DIV_24
- * @arg @ref LL_RCC_PLLSAI2P_DIV_25
- * @arg @ref LL_RCC_PLLSAI2P_DIV_26
- * @arg @ref LL_RCC_PLLSAI2P_DIV_27
- * @arg @ref LL_RCC_PLLSAI2P_DIV_28
- * @arg @ref LL_RCC_PLLSAI2P_DIV_29
- * @arg @ref LL_RCC_PLLSAI2P_DIV_30
- * @arg @ref LL_RCC_PLLSAI2P_DIV_31
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM);
- MODIFY_REG(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2N | RCC_PLLSAI2CFGR_PLLSAI2PDIV, PLLN << RCC_PLLSAI2CFGR_PLLSAI2N_Pos | PLLP);
- }
- #else
- /**
- * @brief Configure PLLSAI2 used for SAI domain clock
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI2 and PLLSAI2 are disabled.
- * @note PLLSAI2N/PLLSAI2P can be written only when PLLSAI2 is disabled.
- * @note This can be selected for SAI1 or SAI2
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI2_ConfigDomain_SAI\n
- * PLLCFGR PLLM LL_RCC_PLLSAI2_ConfigDomain_SAI\n
- * PLLSAI2CFGR PLLSAI2N LL_RCC_PLLSAI2_ConfigDomain_SAI\n
- * PLLSAI2CFGR PLLSAI2P LL_RCC_PLLSAI2_ConfigDomain_SAI
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param PLLN Between 8 and 86
- * @param PLLP This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2P_DIV_7
- * @arg @ref LL_RCC_PLLSAI2P_DIV_17
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_ConfigDomain_SAI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLP)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM);
- MODIFY_REG(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2N | RCC_PLLSAI2CFGR_PLLSAI2P, PLLN << RCC_PLLSAI2CFGR_PLLSAI2N_Pos | PLLP);
- }
- #endif /* RCC_PLLSAI2M_DIV_1_16_SUPPORT && RCC_PLLSAI2P_DIV_2_31_SUPPORT */
- #if defined(DSI)
- /**
- * @brief Configure PLLSAI2 used for DSI domain clock
- * @note PLL Source can be written only when PLL, PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLSAI2M/PLLSAI2N/PLLSAI2Q can be written only when PLLSAI2 is disabled.
- * @note This can be selected for DSI
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI2_ConfigDomain_DSI\n
- * PLLSAI2CFGR PLLSAI2M LL_RCC_PLLSAI2_ConfigDomain_DSI\n
- * PLLSAI2CFGR PLLSAI2N LL_RCC_PLLSAI2_ConfigDomain_DSI\n
- * PLLSAI2CFGR PLLSAI2Q LL_RCC_PLLSAI2_ConfigDomain_DSI
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2M_DIV_1
- * @arg @ref LL_RCC_PLLSAI2M_DIV_2
- * @arg @ref LL_RCC_PLLSAI2M_DIV_3
- * @arg @ref LL_RCC_PLLSAI2M_DIV_4
- * @arg @ref LL_RCC_PLLSAI2M_DIV_5
- * @arg @ref LL_RCC_PLLSAI2M_DIV_6
- * @arg @ref LL_RCC_PLLSAI2M_DIV_7
- * @arg @ref LL_RCC_PLLSAI2M_DIV_8
- * @arg @ref LL_RCC_PLLSAI2M_DIV_9
- * @arg @ref LL_RCC_PLLSAI2M_DIV_10
- * @arg @ref LL_RCC_PLLSAI2M_DIV_11
- * @arg @ref LL_RCC_PLLSAI2M_DIV_12
- * @arg @ref LL_RCC_PLLSAI2M_DIV_13
- * @arg @ref LL_RCC_PLLSAI2M_DIV_14
- * @arg @ref LL_RCC_PLLSAI2M_DIV_15
- * @arg @ref LL_RCC_PLLSAI2M_DIV_16
- * @param PLLN Between 8 and 127
- * @param PLLQ This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_2
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_4
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_6
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_8
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_ConfigDomain_DSI(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLQ)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, Source);
- MODIFY_REG(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2M | RCC_PLLSAI2CFGR_PLLSAI2N | RCC_PLLSAI2CFGR_PLLSAI2Q,
- (PLLN << RCC_PLLSAI2CFGR_PLLSAI2N_Pos) | PLLQ | PLLM);
- }
- #endif /* DSI */
- #if defined(LTDC)
- /**
- * @brief Configure PLLSAI2 used for LTDC domain clock
- * @note PLL Source can be written only when PLL, PLLSAI1 and PLLSAI2 (*) are disabled.
- * @note PLLSAI2M/PLLSAI2N/PLLSAI2R can be written only when PLLSAI2 is disabled.
- * @note This can be selected for LTDC
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI2_ConfigDomain_LTDC\n
- * PLLSAI2CFGR PLLSAI2M LL_RCC_PLLSAI2_ConfigDomain_LTDC\n
- * PLLSAI2CFGR PLLSAI2N LL_RCC_PLLSAI2_ConfigDomain_LTDC\n
- * PLLSAI2CFGR PLLSAI2R LL_RCC_PLLSAI2_ConfigDomain_LTDC\n
- * CCIPR2 PLLSAI2DIVR LL_RCC_PLLSAI2_ConfigDomain_LTDC
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2M_DIV_1
- * @arg @ref LL_RCC_PLLSAI2M_DIV_2
- * @arg @ref LL_RCC_PLLSAI2M_DIV_3
- * @arg @ref LL_RCC_PLLSAI2M_DIV_4
- * @arg @ref LL_RCC_PLLSAI2M_DIV_5
- * @arg @ref LL_RCC_PLLSAI2M_DIV_6
- * @arg @ref LL_RCC_PLLSAI2M_DIV_7
- * @arg @ref LL_RCC_PLLSAI2M_DIV_8
- * @arg @ref LL_RCC_PLLSAI2M_DIV_9
- * @arg @ref LL_RCC_PLLSAI2M_DIV_10
- * @arg @ref LL_RCC_PLLSAI2M_DIV_11
- * @arg @ref LL_RCC_PLLSAI2M_DIV_12
- * @arg @ref LL_RCC_PLLSAI2M_DIV_13
- * @arg @ref LL_RCC_PLLSAI2M_DIV_14
- * @arg @ref LL_RCC_PLLSAI2M_DIV_15
- * @arg @ref LL_RCC_PLLSAI2M_DIV_16
- * @param PLLN Between 8 and 127
- * @param PLLR This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2R_DIV_2
- * @arg @ref LL_RCC_PLLSAI2R_DIV_4
- * @arg @ref LL_RCC_PLLSAI2R_DIV_6
- * @arg @ref LL_RCC_PLLSAI2R_DIV_8
- * @param PLLDIVR This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_2
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_4
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_8
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_16
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_ConfigDomain_LTDC(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR, uint32_t PLLDIVR)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, Source);
- MODIFY_REG(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2M | RCC_PLLSAI2CFGR_PLLSAI2N | RCC_PLLSAI2CFGR_PLLSAI2R,
- (PLLN << RCC_PLLSAI2CFGR_PLLSAI2N_Pos) | PLLR | PLLM);
- MODIFY_REG(RCC->CCIPR2, RCC_CCIPR2_PLLSAI2DIVR, PLLDIVR);
- }
- #else
- /**
- * @brief Configure PLLSAI2 used for ADC domain clock
- * @note PLL Source and PLLM Divider can be written only when PLL,
- * PLLSAI2 and PLLSAI2 are disabled.
- * @note PLLSAI2N/PLLSAI2R can be written only when PLLSAI2 is disabled.
- * @note This can be selected for ADC
- * @rmtoll PLLCFGR PLLSRC LL_RCC_PLLSAI2_ConfigDomain_ADC\n
- * PLLCFGR PLLM LL_RCC_PLLSAI2_ConfigDomain_ADC\n
- * PLLSAI2CFGR PLLSAI2N LL_RCC_PLLSAI2_ConfigDomain_ADC\n
- * PLLSAI2CFGR PLLSAI2R LL_RCC_PLLSAI2_ConfigDomain_ADC
- * @param Source This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSOURCE_NONE
- * @arg @ref LL_RCC_PLLSOURCE_MSI
- * @arg @ref LL_RCC_PLLSOURCE_HSI
- * @arg @ref LL_RCC_PLLSOURCE_HSE
- * @param PLLM This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLM_DIV_1
- * @arg @ref LL_RCC_PLLM_DIV_2
- * @arg @ref LL_RCC_PLLM_DIV_3
- * @arg @ref LL_RCC_PLLM_DIV_4
- * @arg @ref LL_RCC_PLLM_DIV_5
- * @arg @ref LL_RCC_PLLM_DIV_6
- * @arg @ref LL_RCC_PLLM_DIV_7
- * @arg @ref LL_RCC_PLLM_DIV_8
- * @param PLLN Between 8 and 86
- * @param PLLR This parameter can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2R_DIV_2
- * @arg @ref LL_RCC_PLLSAI2R_DIV_4
- * @arg @ref LL_RCC_PLLSAI2R_DIV_6
- * @arg @ref LL_RCC_PLLSAI2R_DIV_8
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_ConfigDomain_ADC(uint32_t Source, uint32_t PLLM, uint32_t PLLN, uint32_t PLLR)
- {
- MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC | RCC_PLLCFGR_PLLM, Source | PLLM);
- MODIFY_REG(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2N | RCC_PLLSAI2CFGR_PLLSAI2R, PLLN << RCC_PLLSAI2CFGR_PLLSAI2N_Pos | PLLR);
- }
- #endif /* LTDC */
- /**
- * @brief Get SAI2PLL multiplication factor for VCO
- * @rmtoll PLLSAI2CFGR PLLSAI2N LL_RCC_PLLSAI2_GetN
- * @retval Between 8 and 86 or 127 depending on devices
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_GetN(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2N) >> RCC_PLLSAI2CFGR_PLLSAI2N_Pos);
- }
- #if defined(RCC_PLLSAI2P_DIV_2_31_SUPPORT)
- /**
- * @brief Get SAI2PLL division factor for PLLSAI2P
- * @note Used for PLLSAI2CLK (SAI1 or SAI2 clock).
- * @rmtoll PLLSAI2CFGR PLLSAI2PDIV LL_RCC_PLLSAI2_GetP
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2P_DIV_2
- * @arg @ref LL_RCC_PLLSAI2P_DIV_3
- * @arg @ref LL_RCC_PLLSAI2P_DIV_4
- * @arg @ref LL_RCC_PLLSAI2P_DIV_5
- * @arg @ref LL_RCC_PLLSAI2P_DIV_6
- * @arg @ref LL_RCC_PLLSAI2P_DIV_7
- * @arg @ref LL_RCC_PLLSAI2P_DIV_8
- * @arg @ref LL_RCC_PLLSAI2P_DIV_9
- * @arg @ref LL_RCC_PLLSAI2P_DIV_10
- * @arg @ref LL_RCC_PLLSAI2P_DIV_11
- * @arg @ref LL_RCC_PLLSAI2P_DIV_12
- * @arg @ref LL_RCC_PLLSAI2P_DIV_13
- * @arg @ref LL_RCC_PLLSAI2P_DIV_14
- * @arg @ref LL_RCC_PLLSAI2P_DIV_15
- * @arg @ref LL_RCC_PLLSAI2P_DIV_16
- * @arg @ref LL_RCC_PLLSAI2P_DIV_17
- * @arg @ref LL_RCC_PLLSAI2P_DIV_18
- * @arg @ref LL_RCC_PLLSAI2P_DIV_19
- * @arg @ref LL_RCC_PLLSAI2P_DIV_20
- * @arg @ref LL_RCC_PLLSAI2P_DIV_21
- * @arg @ref LL_RCC_PLLSAI2P_DIV_22
- * @arg @ref LL_RCC_PLLSAI2P_DIV_23
- * @arg @ref LL_RCC_PLLSAI2P_DIV_24
- * @arg @ref LL_RCC_PLLSAI2P_DIV_25
- * @arg @ref LL_RCC_PLLSAI2P_DIV_26
- * @arg @ref LL_RCC_PLLSAI2P_DIV_27
- * @arg @ref LL_RCC_PLLSAI2P_DIV_28
- * @arg @ref LL_RCC_PLLSAI2P_DIV_29
- * @arg @ref LL_RCC_PLLSAI2P_DIV_30
- * @arg @ref LL_RCC_PLLSAI2P_DIV_31
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_GetP(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2PDIV));
- }
- #else
- /**
- * @brief Get SAI2PLL division factor for PLLSAI2P
- * @note Used for PLLSAI2CLK (SAI1 or SAI2 clock).
- * @rmtoll PLLSAI2CFGR PLLSAI2P LL_RCC_PLLSAI2_GetP
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2P_DIV_7
- * @arg @ref LL_RCC_PLLSAI2P_DIV_17
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_GetP(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2P));
- }
- #endif /* RCC_PLLSAI2P_DIV_2_31_SUPPORT */
- #if defined(RCC_PLLSAI2Q_DIV_SUPPORT)
- /**
- * @brief Get division factor for PLLSAI2Q
- * @note Used for PLLDSICLK (DSI clock)
- * @rmtoll PLLSAI2CFGR PLLSAI2Q LL_RCC_PLLSAI2_GetQ
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_2
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_4
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_6
- * @arg @ref LL_RCC_PLLSAI2Q_DIV_8
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_GetQ(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2Q));
- }
- #endif /* RCC_PLLSAI2Q_DIV_SUPPORT */
- /**
- * @brief Get SAI2PLL division factor for PLLSAI2R
- * @note Used for PLLADC2CLK (ADC clock) or PLLLCDCLK (LTDC clock) depending on devices
- * @rmtoll PLLSAI2CFGR PLLSAI2R LL_RCC_PLLSAI2_GetR
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2R_DIV_2
- * @arg @ref LL_RCC_PLLSAI2R_DIV_4
- * @arg @ref LL_RCC_PLLSAI2R_DIV_6
- * @arg @ref LL_RCC_PLLSAI2R_DIV_8
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_GetR(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2R));
- }
- #if defined(RCC_PLLSAI2M_DIV_1_16_SUPPORT)
- /**
- * @brief Get Division factor for the PLLSAI2
- * @rmtoll PLLSAI2CFGR PLLSAI2M LL_RCC_PLLSAI2_GetDivider
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2M_DIV_1
- * @arg @ref LL_RCC_PLLSAI2M_DIV_2
- * @arg @ref LL_RCC_PLLSAI2M_DIV_3
- * @arg @ref LL_RCC_PLLSAI2M_DIV_4
- * @arg @ref LL_RCC_PLLSAI2M_DIV_5
- * @arg @ref LL_RCC_PLLSAI2M_DIV_6
- * @arg @ref LL_RCC_PLLSAI2M_DIV_7
- * @arg @ref LL_RCC_PLLSAI2M_DIV_8
- * @arg @ref LL_RCC_PLLSAI2M_DIV_9
- * @arg @ref LL_RCC_PLLSAI2M_DIV_10
- * @arg @ref LL_RCC_PLLSAI2M_DIV_11
- * @arg @ref LL_RCC_PLLSAI2M_DIV_12
- * @arg @ref LL_RCC_PLLSAI2M_DIV_13
- * @arg @ref LL_RCC_PLLSAI2M_DIV_14
- * @arg @ref LL_RCC_PLLSAI2M_DIV_15
- * @arg @ref LL_RCC_PLLSAI2M_DIV_16
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_GetDivider(void)
- {
- return (uint32_t)(READ_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2M));
- }
- #endif /* RCC_PLLSAI2M_DIV_1_16_SUPPORT */
- #if defined(RCC_CCIPR2_PLLSAI2DIVR)
- /**
- * @brief Get PLLSAI2 division factor for PLLSAI2DIVR
- * @note Used for LTDC domain clock
- * @rmtoll CCIPR2 PLLSAI2DIVR LL_RCC_PLLSAI2_GetDIVR
- * @retval Returned value can be one of the following values:
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_2
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_4
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_8
- * @arg @ref LL_RCC_PLLSAI2DIVR_DIV_16
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_GetDIVR(void)
- {
- return (uint32_t)(READ_BIT(RCC->CCIPR2, RCC_CCIPR2_PLLSAI2DIVR));
- }
- #endif /* RCC_CCIPR2_PLLSAI2DIVR */
- /**
- * @brief Enable PLLSAI2 output mapped on SAI domain clock
- * @rmtoll PLLSAI2CFGR PLLSAI2PEN LL_RCC_PLLSAI2_EnableDomain_SAI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_EnableDomain_SAI(void)
- {
- SET_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2PEN);
- }
- /**
- * @brief Disable PLLSAI2 output mapped on SAI domain clock
- * @note In order to save power, when of the PLLSAI2 is
- * not used, should be 0
- * @rmtoll PLLSAI2CFGR PLLSAI2PEN LL_RCC_PLLSAI2_DisableDomain_SAI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_DisableDomain_SAI(void)
- {
- CLEAR_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2PEN);
- }
- /**
- * @brief Check if PLLSAI2 output mapped on SAI domain clock is enabled
- * @rmtoll PLLSAI2CFGR PLLSAI2PEN LL_RCC_PLLSAI2_IsEnabledDomain_SAI
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_IsEnabledDomain_SAI(void)
- {
- return ((READ_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2PEN) == (RCC_PLLSAI2CFGR_PLLSAI2PEN)) ? 1UL : 0UL);
- }
- #if defined(DSI)
- /**
- * @brief Enable PLLSAI2 output mapped on DSI domain clock
- * @rmtoll PLLSAI2CFGR PLLSAI2QEN LL_RCC_PLLSAI2_EnableDomain_DSI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_EnableDomain_DSI(void)
- {
- SET_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2QEN);
- }
- /**
- * @brief Disable PLLSAI2 output mapped on DSI domain clock
- * @note In order to save power, when of the PLLSAI2 is
- * not used, Main PLLSAI2 should be 0
- * @rmtoll PLLSAI2CFGR PLLSAI2QEN LL_RCC_PLLSAI2_DisableDomain_DSI
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_DisableDomain_DSI(void)
- {
- CLEAR_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2QEN);
- }
- /**
- * @brief Check if PLLSAI2 output mapped on DSI domain clock is enabled
- * @rmtoll PLLSAI2CFGR PLLSAI2QEN LL_RCC_PLLSAI2_IsEnabledDomain_DSI
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_IsEnabledDomain_DSI(void)
- {
- return ((READ_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2QEN) == (RCC_PLLSAI2CFGR_PLLSAI2QEN)) ? 1UL : 0UL);
- }
- #endif /* DSI */
- #if defined(LTDC)
- /**
- * @brief Enable PLLSAI2 output mapped on LTDC domain clock
- * @rmtoll PLLSAI2CFGR PLLSAI2REN LL_RCC_PLLSAI2_EnableDomain_LTDC
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_EnableDomain_LTDC(void)
- {
- SET_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2REN);
- }
- /**
- * @brief Disable PLLSAI2 output mapped on LTDC domain clock
- * @note In order to save power, when of the PLLSAI2 is
- * not used, Main PLLSAI2 should be 0
- * @rmtoll PLLSAI2CFGR PLLSAI2REN LL_RCC_PLLSAI2_DisableDomain_LTDC
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_DisableDomain_LTDC(void)
- {
- CLEAR_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2REN);
- }
- /**
- * @brief Check if PLLSAI2 output mapped on LTDC domain clock is enabled
- * @rmtoll PLLSAI2CFGR PLLSAI2REN LL_RCC_PLLSAI2_IsEnabledDomain_LTDC
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_IsEnabledDomain_LTDC(void)
- {
- return ((READ_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2REN) == (RCC_PLLSAI2CFGR_PLLSAI2REN)) ? 1UL : 0UL);
- }
- #else
- /**
- * @brief Enable PLLSAI2 output mapped on ADC domain clock
- * @rmtoll PLLSAI2CFGR PLLSAI2REN LL_RCC_PLLSAI2_EnableDomain_ADC
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_EnableDomain_ADC(void)
- {
- SET_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2REN);
- }
- /**
- * @brief Disable PLLSAI2 output mapped on ADC domain clock
- * @note In order to save power, when of the PLLSAI2 is
- * not used, Main PLLSAI2 should be 0
- * @rmtoll PLLSAI2CFGR PLLSAI2REN LL_RCC_PLLSAI2_DisableDomain_ADC
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_PLLSAI2_DisableDomain_ADC(void)
- {
- CLEAR_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2REN);
- }
- /**
- * @brief Check if PLLSAI2 output mapped on ADC domain clock is enabled
- * @rmtoll PLLSAI2CFGR PLLSAI2REN LL_RCC_PLLSAI2_IsEnabledDomain_ADC
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_PLLSAI2_IsEnabledDomain_ADC(void)
- {
- return ((READ_BIT(RCC->PLLSAI2CFGR, RCC_PLLSAI2CFGR_PLLSAI2REN) == (RCC_PLLSAI2CFGR_PLLSAI2REN)) ? 1UL : 0UL);
- }
- #endif /* LTDC */
- /**
- * @}
- */
- #endif /* RCC_PLLSAI2_SUPPORT */
- #if defined(OCTOSPI1)
- /** @defgroup RCC_LL_EF_OCTOSPI OCTOSPI
- * @{
- */
- /**
- * @brief Configure OCTOSPI1 DQS delay
- * @rmtoll DLYCFGR OCTOSPI1_DLY LL_RCC_OCTOSPI1_DelayConfig
- * @param Delay OCTOSPI1 DQS delay between 0 and 15
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_OCTOSPI1_DelayConfig(uint32_t Delay)
- {
- MODIFY_REG(RCC->DLYCFGR, RCC_DLYCFGR_OCTOSPI1_DLY, Delay);
- }
- #if defined(OCTOSPI2)
- /**
- * @brief Configure OCTOSPI2 DQS delay
- * @rmtoll DLYCFGR OCTOSPI2_DLY LL_RCC_OCTOSPI2_DelayConfig
- * @param Delay OCTOSPI2 DQS delay between 0 and 15
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_OCTOSPI2_DelayConfig(uint32_t Delay)
- {
- MODIFY_REG(RCC->DLYCFGR, RCC_DLYCFGR_OCTOSPI2_DLY, (Delay << RCC_DLYCFGR_OCTOSPI2_DLY_Pos));
- }
- #endif /* OCTOSPI2 */
- /**
- * @}
- */
- #endif /* OCTOSPI1 */
- /** @defgroup RCC_LL_EF_FLAG_Management FLAG Management
- * @{
- */
- /**
- * @brief Clear LSI ready interrupt flag
- * @rmtoll CICR LSIRDYC LL_RCC_ClearFlag_LSIRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_LSIRDY(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_LSIRDYC);
- }
- /**
- * @brief Clear LSE ready interrupt flag
- * @rmtoll CICR LSERDYC LL_RCC_ClearFlag_LSERDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_LSERDY(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_LSERDYC);
- }
- /**
- * @brief Clear MSI ready interrupt flag
- * @rmtoll CICR MSIRDYC LL_RCC_ClearFlag_MSIRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_MSIRDY(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_MSIRDYC);
- }
- /**
- * @brief Clear HSI ready interrupt flag
- * @rmtoll CICR HSIRDYC LL_RCC_ClearFlag_HSIRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_HSIRDY(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_HSIRDYC);
- }
- /**
- * @brief Clear HSE ready interrupt flag
- * @rmtoll CICR HSERDYC LL_RCC_ClearFlag_HSERDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_HSERDY(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_HSERDYC);
- }
- /**
- * @brief Clear PLL ready interrupt flag
- * @rmtoll CICR PLLRDYC LL_RCC_ClearFlag_PLLRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_PLLRDY(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_PLLRDYC);
- }
- #if defined(RCC_HSI48_SUPPORT)
- /**
- * @brief Clear HSI48 ready interrupt flag
- * @rmtoll CICR HSI48RDYC LL_RCC_ClearFlag_HSI48RDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_HSI48RDY(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_HSI48RDYC);
- }
- #endif /* RCC_HSI48_SUPPORT */
- #if defined(RCC_PLLSAI1_SUPPORT)
- /**
- * @brief Clear PLLSAI1 ready interrupt flag
- * @rmtoll CICR PLLSAI1RDYC LL_RCC_ClearFlag_PLLSAI1RDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_PLLSAI1RDY(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_PLLSAI1RDYC);
- }
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT)
- /**
- * @brief Clear PLLSAI1 ready interrupt flag
- * @rmtoll CICR PLLSAI2RDYC LL_RCC_ClearFlag_PLLSAI2RDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_PLLSAI2RDY(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_PLLSAI2RDYC);
- }
- #endif /* RCC_PLLSAI2_SUPPORT */
- /**
- * @brief Clear Clock security system interrupt flag
- * @rmtoll CICR CSSC LL_RCC_ClearFlag_HSECSS
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_HSECSS(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_CSSC);
- }
- /**
- * @brief Clear LSE Clock security system interrupt flag
- * @rmtoll CICR LSECSSC LL_RCC_ClearFlag_LSECSS
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearFlag_LSECSS(void)
- {
- SET_BIT(RCC->CICR, RCC_CICR_LSECSSC);
- }
- /**
- * @brief Check if LSI ready interrupt occurred or not
- * @rmtoll CIFR LSIRDYF LL_RCC_IsActiveFlag_LSIRDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSIRDY(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_LSIRDYF) == RCC_CIFR_LSIRDYF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if LSE ready interrupt occurred or not
- * @rmtoll CIFR LSERDYF LL_RCC_IsActiveFlag_LSERDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSERDY(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_LSERDYF) == RCC_CIFR_LSERDYF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if MSI ready interrupt occurred or not
- * @rmtoll CIFR MSIRDYF LL_RCC_IsActiveFlag_MSIRDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_MSIRDY(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_MSIRDYF) == RCC_CIFR_MSIRDYF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if HSI ready interrupt occurred or not
- * @rmtoll CIFR HSIRDYF LL_RCC_IsActiveFlag_HSIRDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSIRDY(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSIRDYF) == RCC_CIFR_HSIRDYF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if HSE ready interrupt occurred or not
- * @rmtoll CIFR HSERDYF LL_RCC_IsActiveFlag_HSERDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSERDY(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSERDYF) == RCC_CIFR_HSERDYF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if PLL ready interrupt occurred or not
- * @rmtoll CIFR PLLRDYF LL_RCC_IsActiveFlag_PLLRDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLLRDY(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_PLLRDYF) == RCC_CIFR_PLLRDYF) ? 1UL : 0UL);
- }
- #if defined(RCC_HSI48_SUPPORT)
- /**
- * @brief Check if HSI48 ready interrupt occurred or not
- * @rmtoll CIR HSI48RDYF LL_RCC_IsActiveFlag_HSI48RDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSI48RDY(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_HSI48RDYF) == RCC_CIFR_HSI48RDYF) ? 1UL : 0UL);
- }
- #endif /* RCC_HSI48_SUPPORT */
- #if defined(RCC_PLLSAI1_SUPPORT)
- /**
- * @brief Check if PLLSAI1 ready interrupt occurred or not
- * @rmtoll CIFR PLLSAI1RDYF LL_RCC_IsActiveFlag_PLLSAI1RDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLLSAI1RDY(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_PLLSAI1RDYF) == RCC_CIFR_PLLSAI1RDYF) ? 1UL : 0UL);
- }
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT)
- /**
- * @brief Check if PLLSAI1 ready interrupt occurred or not
- * @rmtoll CIFR PLLSAI2RDYF LL_RCC_IsActiveFlag_PLLSAI2RDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PLLSAI2RDY(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_PLLSAI2RDYF) == RCC_CIFR_PLLSAI2RDYF) ? 1UL : 0UL);
- }
- #endif /* RCC_PLLSAI2_SUPPORT */
- /**
- * @brief Check if Clock security system interrupt occurred or not
- * @rmtoll CIFR CSSF LL_RCC_IsActiveFlag_HSECSS
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_HSECSS(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_CSSF) == RCC_CIFR_CSSF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if LSE Clock security system interrupt occurred or not
- * @rmtoll CIFR LSECSSF LL_RCC_IsActiveFlag_LSECSS
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LSECSS(void)
- {
- return ((READ_BIT(RCC->CIFR, RCC_CIFR_LSECSSF) == RCC_CIFR_LSECSSF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if RCC flag FW reset is set or not.
- * @rmtoll CSR FWRSTF LL_RCC_IsActiveFlag_FWRST
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_FWRST(void)
- {
- return ((READ_BIT(RCC->CSR, RCC_CSR_FWRSTF) == RCC_CSR_FWRSTF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if RCC flag Independent Watchdog reset is set or not.
- * @rmtoll CSR IWDGRSTF LL_RCC_IsActiveFlag_IWDGRST
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_IWDGRST(void)
- {
- return ((READ_BIT(RCC->CSR, RCC_CSR_IWDGRSTF) == RCC_CSR_IWDGRSTF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if RCC flag Low Power reset is set or not.
- * @rmtoll CSR LPWRRSTF LL_RCC_IsActiveFlag_LPWRRST
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_LPWRRST(void)
- {
- return ((READ_BIT(RCC->CSR, RCC_CSR_LPWRRSTF) == RCC_CSR_LPWRRSTF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if RCC flag is set or not.
- * @rmtoll CSR OBLRSTF LL_RCC_IsActiveFlag_OBLRST
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_OBLRST(void)
- {
- return ((READ_BIT(RCC->CSR, RCC_CSR_OBLRSTF) == RCC_CSR_OBLRSTF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if RCC flag Pin reset is set or not.
- * @rmtoll CSR PINRSTF LL_RCC_IsActiveFlag_PINRST
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_PINRST(void)
- {
- return ((READ_BIT(RCC->CSR, RCC_CSR_PINRSTF) == RCC_CSR_PINRSTF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if RCC flag Software reset is set or not.
- * @rmtoll CSR SFTRSTF LL_RCC_IsActiveFlag_SFTRST
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_SFTRST(void)
- {
- return ((READ_BIT(RCC->CSR, RCC_CSR_SFTRSTF) == RCC_CSR_SFTRSTF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if RCC flag Window Watchdog reset is set or not.
- * @rmtoll CSR WWDGRSTF LL_RCC_IsActiveFlag_WWDGRST
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_WWDGRST(void)
- {
- return ((READ_BIT(RCC->CSR, RCC_CSR_WWDGRSTF) == RCC_CSR_WWDGRSTF) ? 1UL : 0UL);
- }
- /**
- * @brief Check if RCC flag BOR reset is set or not.
- * @rmtoll CSR BORRSTF LL_RCC_IsActiveFlag_BORRST
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsActiveFlag_BORRST(void)
- {
- return ((READ_BIT(RCC->CSR, RCC_CSR_BORRSTF) == RCC_CSR_BORRSTF) ? 1UL : 0UL);
- }
- /**
- * @brief Set RMVF bit to clear the reset flags.
- * @rmtoll CSR RMVF LL_RCC_ClearResetFlags
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_ClearResetFlags(void)
- {
- SET_BIT(RCC->CSR, RCC_CSR_RMVF);
- }
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_IT_Management IT Management
- * @{
- */
- /**
- * @brief Enable LSI ready interrupt
- * @rmtoll CIER LSIRDYIE LL_RCC_EnableIT_LSIRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableIT_LSIRDY(void)
- {
- SET_BIT(RCC->CIER, RCC_CIER_LSIRDYIE);
- }
- /**
- * @brief Enable LSE ready interrupt
- * @rmtoll CIER LSERDYIE LL_RCC_EnableIT_LSERDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableIT_LSERDY(void)
- {
- SET_BIT(RCC->CIER, RCC_CIER_LSERDYIE);
- }
- /**
- * @brief Enable MSI ready interrupt
- * @rmtoll CIER MSIRDYIE LL_RCC_EnableIT_MSIRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableIT_MSIRDY(void)
- {
- SET_BIT(RCC->CIER, RCC_CIER_MSIRDYIE);
- }
- /**
- * @brief Enable HSI ready interrupt
- * @rmtoll CIER HSIRDYIE LL_RCC_EnableIT_HSIRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableIT_HSIRDY(void)
- {
- SET_BIT(RCC->CIER, RCC_CIER_HSIRDYIE);
- }
- /**
- * @brief Enable HSE ready interrupt
- * @rmtoll CIER HSERDYIE LL_RCC_EnableIT_HSERDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableIT_HSERDY(void)
- {
- SET_BIT(RCC->CIER, RCC_CIER_HSERDYIE);
- }
- /**
- * @brief Enable PLL ready interrupt
- * @rmtoll CIER PLLRDYIE LL_RCC_EnableIT_PLLRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableIT_PLLRDY(void)
- {
- SET_BIT(RCC->CIER, RCC_CIER_PLLRDYIE);
- }
- #if defined(RCC_HSI48_SUPPORT)
- /**
- * @brief Enable HSI48 ready interrupt
- * @rmtoll CIER HSI48RDYIE LL_RCC_EnableIT_HSI48RDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableIT_HSI48RDY(void)
- {
- SET_BIT(RCC->CIER, RCC_CIER_HSI48RDYIE);
- }
- #endif /* RCC_HSI48_SUPPORT */
- #if defined(RCC_PLLSAI1_SUPPORT)
- /**
- * @brief Enable PLLSAI1 ready interrupt
- * @rmtoll CIER PLLSAI1RDYIE LL_RCC_EnableIT_PLLSAI1RDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableIT_PLLSAI1RDY(void)
- {
- SET_BIT(RCC->CIER, RCC_CIER_PLLSAI1RDYIE);
- }
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT)
- /**
- * @brief Enable PLLSAI2 ready interrupt
- * @rmtoll CIER PLLSAI2RDYIE LL_RCC_EnableIT_PLLSAI2RDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableIT_PLLSAI2RDY(void)
- {
- SET_BIT(RCC->CIER, RCC_CIER_PLLSAI2RDYIE);
- }
- #endif /* RCC_PLLSAI2_SUPPORT */
- /**
- * @brief Enable LSE clock security system interrupt
- * @rmtoll CIER LSECSSIE LL_RCC_EnableIT_LSECSS
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_EnableIT_LSECSS(void)
- {
- SET_BIT(RCC->CIER, RCC_CIER_LSECSSIE);
- }
- /**
- * @brief Disable LSI ready interrupt
- * @rmtoll CIER LSIRDYIE LL_RCC_DisableIT_LSIRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableIT_LSIRDY(void)
- {
- CLEAR_BIT(RCC->CIER, RCC_CIER_LSIRDYIE);
- }
- /**
- * @brief Disable LSE ready interrupt
- * @rmtoll CIER LSERDYIE LL_RCC_DisableIT_LSERDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableIT_LSERDY(void)
- {
- CLEAR_BIT(RCC->CIER, RCC_CIER_LSERDYIE);
- }
- /**
- * @brief Disable MSI ready interrupt
- * @rmtoll CIER MSIRDYIE LL_RCC_DisableIT_MSIRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableIT_MSIRDY(void)
- {
- CLEAR_BIT(RCC->CIER, RCC_CIER_MSIRDYIE);
- }
- /**
- * @brief Disable HSI ready interrupt
- * @rmtoll CIER HSIRDYIE LL_RCC_DisableIT_HSIRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableIT_HSIRDY(void)
- {
- CLEAR_BIT(RCC->CIER, RCC_CIER_HSIRDYIE);
- }
- /**
- * @brief Disable HSE ready interrupt
- * @rmtoll CIER HSERDYIE LL_RCC_DisableIT_HSERDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableIT_HSERDY(void)
- {
- CLEAR_BIT(RCC->CIER, RCC_CIER_HSERDYIE);
- }
- /**
- * @brief Disable PLL ready interrupt
- * @rmtoll CIER PLLRDYIE LL_RCC_DisableIT_PLLRDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableIT_PLLRDY(void)
- {
- CLEAR_BIT(RCC->CIER, RCC_CIER_PLLRDYIE);
- }
- #if defined(RCC_HSI48_SUPPORT)
- /**
- * @brief Disable HSI48 ready interrupt
- * @rmtoll CIER HSI48RDYIE LL_RCC_DisableIT_HSI48RDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableIT_HSI48RDY(void)
- {
- CLEAR_BIT(RCC->CIER, RCC_CIER_HSI48RDYIE);
- }
- #endif /* RCC_HSI48_SUPPORT */
- #if defined(RCC_PLLSAI1_SUPPORT)
- /**
- * @brief Disable PLLSAI1 ready interrupt
- * @rmtoll CIER PLLSAI1RDYIE LL_RCC_DisableIT_PLLSAI1RDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableIT_PLLSAI1RDY(void)
- {
- CLEAR_BIT(RCC->CIER, RCC_CIER_PLLSAI1RDYIE);
- }
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT)
- /**
- * @brief Disable PLLSAI2 ready interrupt
- * @rmtoll CIER PLLSAI2RDYIE LL_RCC_DisableIT_PLLSAI2RDY
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableIT_PLLSAI2RDY(void)
- {
- CLEAR_BIT(RCC->CIER, RCC_CIER_PLLSAI2RDYIE);
- }
- #endif /* RCC_PLLSAI2_SUPPORT */
- /**
- * @brief Disable LSE clock security system interrupt
- * @rmtoll CIER LSECSSIE LL_RCC_DisableIT_LSECSS
- * @retval None
- */
- __STATIC_INLINE void LL_RCC_DisableIT_LSECSS(void)
- {
- CLEAR_BIT(RCC->CIER, RCC_CIER_LSECSSIE);
- }
- /**
- * @brief Checks if LSI ready interrupt source is enabled or disabled.
- * @rmtoll CIER LSIRDYIE LL_RCC_IsEnabledIT_LSIRDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSIRDY(void)
- {
- return ((READ_BIT(RCC->CIER, RCC_CIER_LSIRDYIE) == RCC_CIER_LSIRDYIE) ? 1UL : 0UL);
- }
- /**
- * @brief Checks if LSE ready interrupt source is enabled or disabled.
- * @rmtoll CIER LSERDYIE LL_RCC_IsEnabledIT_LSERDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSERDY(void)
- {
- return ((READ_BIT(RCC->CIER, RCC_CIER_LSERDYIE) == RCC_CIER_LSERDYIE) ? 1UL : 0UL);
- }
- /**
- * @brief Checks if MSI ready interrupt source is enabled or disabled.
- * @rmtoll CIER MSIRDYIE LL_RCC_IsEnabledIT_MSIRDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_MSIRDY(void)
- {
- return ((READ_BIT(RCC->CIER, RCC_CIER_MSIRDYIE) == RCC_CIER_MSIRDYIE) ? 1UL : 0UL);
- }
- /**
- * @brief Checks if HSI ready interrupt source is enabled or disabled.
- * @rmtoll CIER HSIRDYIE LL_RCC_IsEnabledIT_HSIRDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSIRDY(void)
- {
- return ((READ_BIT(RCC->CIER, RCC_CIER_HSIRDYIE) == RCC_CIER_HSIRDYIE) ? 1UL : 0UL);
- }
- /**
- * @brief Checks if HSE ready interrupt source is enabled or disabled.
- * @rmtoll CIER HSERDYIE LL_RCC_IsEnabledIT_HSERDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSERDY(void)
- {
- return ((READ_BIT(RCC->CIER, RCC_CIER_HSERDYIE) == RCC_CIER_HSERDYIE) ? 1UL : 0UL);
- }
- /**
- * @brief Checks if PLL ready interrupt source is enabled or disabled.
- * @rmtoll CIER PLLRDYIE LL_RCC_IsEnabledIT_PLLRDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_PLLRDY(void)
- {
- return ((READ_BIT(RCC->CIER, RCC_CIER_PLLRDYIE) == RCC_CIER_PLLRDYIE) ? 1UL : 0UL);
- }
- #if defined(RCC_HSI48_SUPPORT)
- /**
- * @brief Checks if HSI48 ready interrupt source is enabled or disabled.
- * @rmtoll CIER HSI48RDYIE LL_RCC_IsEnabledIT_HSI48RDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_HSI48RDY(void)
- {
- return ((READ_BIT(RCC->CIER, RCC_CIER_HSI48RDYIE) == RCC_CIER_HSI48RDYIE) ? 1UL : 0UL);
- }
- #endif /* RCC_HSI48_SUPPORT */
- #if defined(RCC_PLLSAI1_SUPPORT)
- /**
- * @brief Checks if PLLSAI1 ready interrupt source is enabled or disabled.
- * @rmtoll CIER PLLSAI1RDYIE LL_RCC_IsEnabledIT_PLLSAI1RDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_PLLSAI1RDY(void)
- {
- return ((READ_BIT(RCC->CIER, RCC_CIER_PLLSAI1RDYIE) == RCC_CIER_PLLSAI1RDYIE) ? 1UL : 0UL);
- }
- #endif /* RCC_PLLSAI1_SUPPORT */
- #if defined(RCC_PLLSAI2_SUPPORT)
- /**
- * @brief Checks if PLLSAI2 ready interrupt source is enabled or disabled.
- * @rmtoll CIER PLLSAI2RDYIE LL_RCC_IsEnabledIT_PLLSAI2RDY
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_PLLSAI2RDY(void)
- {
- return ((READ_BIT(RCC->CIER, RCC_CIER_PLLSAI2RDYIE) == RCC_CIER_PLLSAI2RDYIE) ? 1UL : 0UL);
- }
- #endif /* RCC_PLLSAI2_SUPPORT */
- /**
- * @brief Checks if LSECSS interrupt source is enabled or disabled.
- * @rmtoll CIER LSECSSIE LL_RCC_IsEnabledIT_LSECSS
- * @retval State of bit (1 or 0).
- */
- __STATIC_INLINE uint32_t LL_RCC_IsEnabledIT_LSECSS(void)
- {
- return ((READ_BIT(RCC->CIER, RCC_CIER_LSECSSIE) == RCC_CIER_LSECSSIE) ? 1UL : 0UL);
- }
- /**
- * @}
- */
- #if defined(USE_FULL_LL_DRIVER)
- /** @defgroup RCC_LL_EF_Init De-initialization function
- * @{
- */
- ErrorStatus LL_RCC_DeInit(void);
- /**
- * @}
- */
- /** @defgroup RCC_LL_EF_Get_Freq Get system and peripherals clocks frequency functions
- * @{
- */
- void LL_RCC_GetSystemClocksFreq(LL_RCC_ClocksTypeDef *RCC_Clocks);
- uint32_t LL_RCC_GetUSARTClockFreq(uint32_t USARTxSource);
- #if defined(UART4) || defined(UART5)
- uint32_t LL_RCC_GetUARTClockFreq(uint32_t UARTxSource);
- #endif /* UART4 || UART5 */
- uint32_t LL_RCC_GetI2CClockFreq(uint32_t I2CxSource);
- uint32_t LL_RCC_GetLPUARTClockFreq(uint32_t LPUARTxSource);
- uint32_t LL_RCC_GetLPTIMClockFreq(uint32_t LPTIMxSource);
- #if defined(SAI1)
- uint32_t LL_RCC_GetSAIClockFreq(uint32_t SAIxSource);
- #endif /* SAI1 */
- #if defined(SDMMC1)
- #if defined(RCC_CCIPR2_SDMMCSEL)
- uint32_t LL_RCC_GetSDMMCKernelClockFreq(uint32_t SDMMCxSource);
- #endif
- uint32_t LL_RCC_GetSDMMCClockFreq(uint32_t SDMMCxSource);
- #endif /* SDMMC1 */
- uint32_t LL_RCC_GetRNGClockFreq(uint32_t RNGxSource);
- #if defined(USB_OTG_FS) || defined(USB)
- uint32_t LL_RCC_GetUSBClockFreq(uint32_t USBxSource);
- #endif /* USB_OTG_FS || USB */
- uint32_t LL_RCC_GetADCClockFreq(uint32_t ADCxSource);
- #if defined(SWPMI1)
- uint32_t LL_RCC_GetSWPMIClockFreq(uint32_t SWPMIxSource);
- #endif /* SWPMI1 */
- #if defined(DFSDM1_Channel0)
- uint32_t LL_RCC_GetDFSDMClockFreq(uint32_t DFSDMxSource);
- #if defined(RCC_CCIPR2_DFSDM1SEL)
- uint32_t LL_RCC_GetDFSDMAudioClockFreq(uint32_t DFSDMxSource);
- #endif /* RCC_CCIPR2_DFSDM1SEL */
- #endif /* DFSDM1_Channel0 */
- #if defined(LTDC)
- uint32_t LL_RCC_GetLTDCClockFreq(uint32_t LTDCxSource);
- #endif /* LTDC */
- #if defined(DSI)
- uint32_t LL_RCC_GetDSIClockFreq(uint32_t DSIxSource);
- #endif /* DSI */
- #if defined(OCTOSPI1)
- uint32_t LL_RCC_GetOCTOSPIClockFreq(uint32_t OCTOSPIxSource);
- #endif /* OCTOSPI1 */
- /**
- * @}
- */
- #endif /* USE_FULL_LL_DRIVER */
- /**
- * @}
- */
- /**
- * @}
- */
- #endif /* defined(RCC) */
- /**
- * @}
- */
- #ifdef __cplusplus
- }
- #endif
- #endif /* STM32L4xx_LL_RCC_H */
|