stm32dev.nut 187 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764
  1. --
  2. -- Retrieve U(S)ARTs available on the device.
  3. --
  4. function GetStmUsarts()
  5. if c_is_provided("STM32F030") then
  6. return { "", "USART1", "USART2" }
  7. end
  8. if c_is_provided("STM32F031") then
  9. return { "", "USART1" }
  10. end
  11. if c_is_provided("STM32F040") then
  12. return { "", "USART1", "USART2" }
  13. end
  14. if c_is_provided("STM32F052") then
  15. return { "", "USART1", "USART2" }
  16. end
  17. if c_is_provided("STM32F072") then
  18. return { "", "USART1", "USART2", "USART3", "USART4", }
  19. end
  20. if c_is_provided("STM32F10X_LD_VL") then
  21. return { "", "USART1", "USART2" }
  22. end
  23. if c_is_provided("STM32F10X_MD") then
  24. return { "", "USART1", "USART2", "USART3" }
  25. end
  26. if c_is_provided("STM32F10X_MD_VL") then
  27. return { "", "USART1", "USART2", "USART3" }
  28. end
  29. if c_is_provided("STM32F10X_HD") then
  30. return { "", "USART1", "USART2", "USART3", "USART4", "USART5" }
  31. end
  32. if c_is_provided("STM32F10X_HD_VL") then
  33. return { "", "USART1", "USART2", "USART3", "USART4", "USART5" }
  34. end
  35. if c_is_provided("STM32F10X_XL") then
  36. return { "", "USART1", "USART2", "USART3", "USART4", "USART5" }
  37. end
  38. if c_is_provided("STM32F10X_CL") then
  39. return { "", "USART1", "USART2", "USART3", "USART4", "USART5" }
  40. end
  41. if c_is_provided("STM32F2x") then
  42. return { "", "USART1", "USART2", "USART3", "USART4", "USART5", "USART6" }
  43. end
  44. if c_is_provided("STM32F30X") then
  45. return { "", "USART1", "USART2", "USART3", "USART4", "USART5" }
  46. end
  47. if c_is_provided("STM32F37X") then
  48. return { "", "USART1", "USART2", "USART3" }
  49. end
  50. if c_is_provided("STM32F40_41xxx") then
  51. return { "", "USART1", "USART2", "USART3", "USART4", "USART5", "USART6" }
  52. end
  53. if c_is_provided("STM32F401xx") then
  54. return { "", "USART1", "USART2", "USART6" }
  55. end
  56. if c_is_provided("STM32F427_437xx") then
  57. return { "", "USART1", "USART2", "USART3", "USART4", "USART5", "USART6", "USART7", "USART8" }
  58. end
  59. if c_is_provided("STM32F429_439xx") then
  60. return { "", "USART1", "USART2", "USART3", "USART4", "USART5", "USART6", "USART7", "USART8" }
  61. end
  62. if c_is_provided("STM32L1XX_MD") then
  63. return { "", "USART1", "USART2", "USART3" }
  64. end
  65. if c_is_provided("STM32L1XX_MDP") then
  66. return { "", "USART1", "USART2", "USART3" }
  67. end
  68. if c_is_provided("STM32L1XX_HD") then
  69. return { "", "USART1", "USART2", "USART3", "USART4", "USART5" }
  70. end
  71. end
  72. --
  73. -- Retrieve USART1TX pins available on the device.
  74. --
  75. function GetTxUsart1()
  76. if c_is_provided("STM32F3XX") then
  77. return { "9", "4", "6", "0", "-1" }
  78. end
  79. return { "9", "6", "-1" }
  80. end
  81. --
  82. -- Retrieve USART1RX pins available on the device.
  83. --
  84. function GetRxUsart1()
  85. if c_is_provided("STM32F3XX") then
  86. return { "10", "5", "7", "1", "-1" }
  87. end
  88. return { "10", "7", "-1" }
  89. end
  90. --
  91. -- Retrieve USART2TX pins available on the device.
  92. --
  93. function GetTxUsart2()
  94. if c_is_provided("STM32F3XX") then
  95. return { "2", "5", "14", "3", "-1" }
  96. end
  97. if c_is_provided("MCU_STM32F0") then
  98. return { "2", "5", "14", "-1" }
  99. end
  100. return { "1", "5", "-1" }
  101. end
  102. --
  103. -- Retrieve USART2RX pins available on the device.
  104. --
  105. function GetRxUsart2()
  106. if c_is_provided("STM32F3XX") then
  107. return { "3", "6", "15", "4", "-1" }
  108. end
  109. return { "3", "6", "-1" }
  110. end
  111. --
  112. -- Retrieve USART3RX pins available on the device.
  113. --
  114. function GetTxUsart3()
  115. if c_is_provided("STM32F07X") then
  116. return { "4", "10", "310", "8", "-1"}
  117. end
  118. if c_is_provided("STM32F3XX") then
  119. return { "11", "311", "9", "15", "-1" }
  120. end
  121. return { "11", "311", "9", "-1" }
  122. end
  123. --
  124. -- Retrieve USART3RX pins available on the device.
  125. --
  126. function GetRxUsart3()
  127. if c_is_provided("STM32F3XX") then
  128. return { "11", "311", "9", "15", "-1" }
  129. end
  130. return { "11", "311", "9", "-1" }
  131. end
  132. --
  133. -- Retrieve USART4TX pins available on the device.
  134. --
  135. function GetTxUsart4()
  136. if c_is_provided("STM32F10X") then
  137. return { "0", "-1" }
  138. end
  139. if c_is_provided("STM32F3XX") then
  140. return { "0", "-1" }
  141. end
  142. return { "0", "10", "-1" }
  143. end
  144. --
  145. -- Retrieve USART4RX pins available on the device.
  146. --
  147. function GetRxUsart4()
  148. if c_is_provided("STM32F10X") then
  149. return { "1", "-1" }
  150. end
  151. if c_is_provided("STM32F3XX") then
  152. return { "1", "-1" }
  153. end
  154. return { "1", "11", "-1" }
  155. end
  156. --
  157. -- Retrieve 32 bit Timers.
  158. --
  159. function GetStmTimers32bit()
  160. if c_is_provided("STM32F2XX") then
  161. return { "2", "5"}
  162. end
  163. if c_is_provided("STM32F30X") then
  164. return { "2"}
  165. end
  166. if c_is_provided("STM32F37X") then
  167. return { "2", "5"}
  168. end
  169. if c_is_provided("STM32F4X") then
  170. return { "2", "5"}
  171. end
  172. end
  173. --
  174. -- Retrieve Timer with at least two channels.
  175. --
  176. function GetStmTimers2Ch()
  177. -- List timers with at least two channels
  178. -- List of all known timers with two channels min:
  179. -- {"", "1", "2", "3", "4", "5", "8", "9", "12", "16", "17", "19"}
  180. if c_is_provided("STM32F10X_LD") then
  181. return { "", "1", "2", "3"}
  182. end
  183. if c_is_provided("STM32F10X_LD_VL") then
  184. return { "", "1", "2", "3"}
  185. end
  186. if c_is_provided("STM32F10X_MD") then
  187. return { "", "1", "2", "3", "4"}
  188. end
  189. if c_is_provided("STM32F10X_MD_VL") then
  190. return { "", "1", "2", "3", "4"}
  191. end
  192. if c_is_provided("STM32F10X_HD") then
  193. return { "", "1", "2", "3", "4", "5"}
  194. end
  195. if c_is_provided("STM32F10X_HD_VL") then
  196. return { "", "1", "2", "3", "4", "5", "12"}
  197. end
  198. if c_is_provided("STM32F10X_XL") then
  199. return { "", "1", "2", "3", "4", "5"}
  200. end
  201. if c_is_provided("STM32F10X_CL") then
  202. return { "", "1", "2", "3", "4", "5"}
  203. end
  204. if c_is_provided("STM32F2XX") then
  205. return { "", "1", "2", "3", "4", "5", "8", "9", "12"}
  206. end
  207. if c_is_provided("STM32F30X") then
  208. return { "", "1", "2", "3", "4", "8", "16", "17"}
  209. end
  210. if c_is_provided("STM32F37X") then
  211. return { "", "2", "3", "4", "5", "9", "12", "16", "17", "19" }
  212. end
  213. if c_is_provided("STM32F401xx") then
  214. return { "", "1", "2", "3", "4", "5", "9"}
  215. end
  216. if c_is_provided("STM32F40_41xxx") then
  217. return { "", "1", "2", "3", "4", "5", "8", "9", "12"}
  218. end
  219. if c_is_provided("STM32F427_437x") then
  220. return { "", "1", "2", "3", "4", "5", "8", "9", "12"}
  221. end
  222. if c_is_provided("STM32F429_439x") then
  223. return { "", "1", "2", "3", "4", "5", "8", "9", "12"}
  224. end
  225. if c_is_provided("STM32L1XX_MD") then
  226. return { "", "2", "3", "4", "9"}
  227. end
  228. if c_is_provided("STM32L1XX_MDP") then
  229. return { "", "2", "3", "4", "5", "9"}
  230. end
  231. if c_is_provided("STM32L1XX_HD") then
  232. return { "", "2", "3", "4", "5", "9"}
  233. end
  234. end
  235. --
  236. -- Retrieve Timer with at least two channels and available interrupt.
  237. --
  238. function GetStmTimers2ChIrq()
  239. -- List timers with at least two channels and a seperated interrupt
  240. -- List of timers with two channels min:
  241. -- {"", "1", "2", "3", "4", "5", "8", "9", "12", "16", "17", "19"}
  242. -- TIM1/TIM8/TIM9/TIM12/TIM16/TIM17 with seperated/coupled interrupts on most devices
  243. -- and so not usable yet
  244. if c_is_provided("STM32F10X_LD") then
  245. return { "", "2", "3"}
  246. end
  247. if c_is_provided("STM32F10X_LD_VL") then
  248. return { "", "2", "3"}
  249. end
  250. if c_is_provided("STM32F10X_MD") then
  251. return { "", "2", "3", "4"}
  252. end
  253. if c_is_provided("STM32F10X_MD_VL") then
  254. return { "", "2", "3", "4"}
  255. end
  256. if c_is_provided("STM32F10X_HD") then
  257. return { "", "2", "3", "4", "5"}
  258. end
  259. if c_is_provided("STM32F10X_HD_VL") then
  260. return { "", "2", "3", "4", "5", "12"}
  261. end
  262. if c_is_provided("STM32F10X_XL") then
  263. return { "", "2", "3", "4", "5"}
  264. end
  265. if c_is_provided("STM32F10X_CL") then
  266. return { "", "2", "3", "4", "5"}
  267. end
  268. if c_is_provided("STM32F2XX") then
  269. return { "", "2", "3", "4", "5"}
  270. end
  271. if c_is_provided("STM32F30X") then
  272. return { "", "2", "3", "4"}
  273. end
  274. if c_is_provided("STM32F37X") then
  275. return { "", "2", "3", "4", "5", "9", "12", "16", "17", "19" }
  276. end
  277. if c_is_provided("STM32F4XX") then
  278. return { "", "2", "3", "4", "5"}
  279. end
  280. if c_is_provided("STM32L1XX_MD") then
  281. return { "", "2", "3", "4", "9"}
  282. end
  283. if c_is_provided("STM32L1XX_MDP") then
  284. return { "", "2", "3", "4", "5", "9"}
  285. end
  286. if c_is_provided("STM32L1XX_HD") then
  287. return { "", "2", "3", "4", "5", "9"}
  288. end
  289. end
  290. nutarch_cm3_stm32_devices =
  291. {
  292. -- ***********************************
  293. --
  294. -- STM32 Device Drivers
  295. --
  296. -- ***********************************
  297. -- STM32F10x RTC
  298. --
  299. {
  300. name = "nutarch_cm3_stm32f10x_rtc",
  301. brief = "STM32F1 RTC Driver",
  302. description = "STM32F1 RTC driver.",
  303. requires = { "HW_RTC_STM32F1" },
  304. provides = { "DEV_RTC" },
  305. sources = { "cm3/dev/stm/stm32f1_rtc.c" },
  306. },
  307. -- STM32 RTC V2
  308. --
  309. {
  310. name = "nutarch_cm3_stm32v2_rtc",
  311. brief = "STM32 RTC Driver V2",
  312. description = "STM32 RTC driver V2.",
  313. requires = { "HW_RTC_STM32_V2" },
  314. provides = { "DEV_RTC" },
  315. sources = { "cm3/dev/stm/stm32_rtc_v2.c" },
  316. },
  317. --
  318. -- STM32 DEBUG Macro (Low-Level Debug UART definition)
  319. --
  320. {
  321. name = "nutarch_cm3_stm32_debugmacro",
  322. brief = "STM32 Low-Level Debug UART macros for use in exception handlers",
  323. description = "Polling UART function (macro) to use in exception handlers\n",
  324. requires = { "DEV_UART_STM32" },
  325. provides = { "DEBUG_MACRO"},
  326. sources = { "cm3/cmsis/cortex_debug.c" },
  327. options =
  328. {
  329. {
  330. macro = "DEBUG_MACRO",
  331. brief = "Enabled",
  332. description = "Check to enable debug output of exception handlers",
  333. flavor = "boolean",
  334. file = "include/cfg/cortex_debug.h"
  335. },
  336. {
  337. macro = "DEBUG_BACKTRACE",
  338. brief = "Enable call backtrace (experimental)",
  339. description = "Check to enable call stack back trace in case of an exception.\n\n"..
  340. "In case of an exception the last 128 words on the stack will\n"..
  341. "be printed out and a call trace will be generated and printed out\n"..
  342. "(Address of the function entry and offset in the function).\n"..
  343. "Together with the .map file and / or the assembler listing\n"..
  344. "the call trace allows you to trace back your code flow in\n"..
  345. "which led to the exception. The assembler listing can be\n"..
  346. "created by 'arm-none-eabi-objdump -d myfile.elf'\n\n"..
  347. "This function is highly experimental and relies on a very\n"..
  348. "defined function entry code and existance of a stack\n"..
  349. "frame pointer\n"..
  350. "To ensure the correct function layout this option disables\n"..
  351. "compiler optimisation and enables a stack frame pointer\n"..
  352. "generation. The following compiler options will be set:\n\n"..
  353. "-O0 -mtpcs-frame -mtpcs-leaf-frame -fno-omit-frame-pointer\n\n"..
  354. "This will enlarge the resulkting binary size significantly\n"..
  355. "any may influence execution performance.\n\n"..
  356. "The backtrace will only work for functions compiled with\n"..
  357. "above compiler parameters. E.g. it will very likely not work"..
  358. "for any newlib functions.\n",
  359. flavor = "boolean",
  360. makedefs = { "MDEBUG+=-O0 -mtpcs-frame -mtpcs-leaf-frame -fno-omit-frame-pointer" },
  361. file = "include/cfg/cortex_debug.h"
  362. },
  363. {
  364. macro = "DEBUG_UART_NR",
  365. brief = "Debug UART",
  366. description = "Select the UART to use for low level debugging",
  367. type = "enumerated",
  368. choices = function() return GetStmUsarts() end,
  369. file = "include/cfg/cortex_debug.h"
  370. }
  371. }
  372. },
  373. --
  374. -- STM32 DEBUG UART configuration
  375. --
  376. {
  377. name = "nutarch_cm3_stm32_devices_debug",
  378. brief = "UART Debug Output (STM32)",
  379. requires = { "DEV_UART_STM32" },
  380. provides = { "DEV_UART", "DEV_FILE", "DEV_WRITE" },
  381. options =
  382. {
  383. {
  384. macro = "DEBUG_USE_UART",
  385. brief = "Select debug UART channel",
  386. description = "Select the UART to use as debug output\n"..
  387. "This is only to adapt the application examples and to tell them\n"..
  388. "which USART to use as stdout.",
  389. type = "enumerated",
  390. default = "DEV_UART1",
  391. choices = function() return GetStmUsarts() end,
  392. file = "include/cfg/uart.h",
  393. -- sources = { "cm3/dev/stm/stm32_usart.c" }
  394. }
  395. }
  396. },
  397. --
  398. -- STM32 Flash Interface F1 and F3
  399. --
  400. {
  401. name = "nutarch_cm3_stm32f1_3_flash",
  402. brief = "Flash and parameter access",
  403. description = "Generic flash and parameter storage interface.",
  404. requires = { "HW_FLASH_STM32F1_3" },
  405. provides = { "HW_FLASH", "HW_FLASH_STM32" };
  406. sources = { "cm3/dev/stm/stm32f1_3_flash.c"}
  407. },
  408. --
  409. -- STM32 Flash Interface L1
  410. --
  411. {
  412. name = "nutarch_cm3_stm32l1_flash",
  413. brief = "Flash access",
  414. description = "Generic flash interface.",
  415. requires = { "HW_FLASH_STM32L1" },
  416. provides = { "HW_FLASH", "HW_FLASH_STM32" },
  417. sources = { "cm3/dev/stm/stm32l1_flash.c"},
  418. options =
  419. {
  420. {
  421. macro = "FLASH_ERASED_PATTERN32",
  422. brief = "Value of erase flash",
  423. description = "Value of erase flash. Mostly 0xffffffff, but e.g 0 for STM32L1",
  424. type = "integer",
  425. default = "0",
  426. file = "include/cfg/memory.h",
  427. },
  428. }
  429. },
  430. --
  431. -- STM32 EEPROM Interface L1
  432. --
  433. {
  434. name = "nutarch_cm3_stm32l1_eeprom",
  435. brief = "EEPROM access",
  436. description = "Generic EEPROM interface.",
  437. requires = { "HW_EEPROM_STM32L1" },
  438. provides = { "DEV_NVMEM" };
  439. sources = { "cm3/dev/stm/stm32l1_eeprom.c"}
  440. },
  441. --
  442. -- STM32 Flash Interface F2 and F4
  443. --
  444. {
  445. name = "nutarch_cm3_stm32f2_4_flash",
  446. brief = "Flash and parameter access",
  447. description = "Generic flash and parameter storage interface.",
  448. requires = { "HW_FLASH_STM32F2_4" },
  449. provides = { "HW_FLASH", "HW_FLASH_STM32" };
  450. sources = { "cm3/dev/stm/stm32f2_4_flash.c"},
  451. options =
  452. {
  453. {
  454. macro = "FLASH_PE_PARALLELISM",
  455. brief = "Program/erase parallelism",
  456. description = "Depending on CPU voltage and eventual external programming voltage,\n"..
  457. "flash erase and programming can happen 8/16/32/64 Bit wide. Default is 32.",
  458. type = "integer",
  459. choices = { "8", "16", "32", "64" },
  460. default = "32",
  461. file = "include/cfg/memory.h",
  462. },
  463. {
  464. macro = "STM32_VRANGE",
  465. brief = "Supply Voltage Range",
  466. description = "E.g. flash access depends on voltage range. Choices are 0 (2.7-3.6V),\n"..
  467. " 1 (2.4-2.7V), 2 (2.1 - 2.4V) and 3 (1.8-21.1)",
  468. type = "integer",
  469. choices = { "0", "1", "2", "3" },
  470. default = "0",
  471. file = "include/cfg/memory.h",
  472. }
  473. }
  474. },
  475. --
  476. --
  477. -- STM32 GPIO Interface Version 2 on L1/F2/F4
  478. --
  479. {
  480. name = "nutarch_cm3_stm32_gpio",
  481. brief = "STM32F2 GPIO",
  482. description = "Generic port I/O API.",
  483. requires = { "HW_GPIO_STM32V2" },
  484. provides = { "HW_GPIO_V2", "HW_GPIO" },
  485. sources = { "cm3/dev/stm/stm32_gpio.c"}
  486. },
  487. --
  488. -- STM32F EXTI Interrupt handler
  489. --
  490. {
  491. name = "nutarch_cm3_stm32_devices_exti04",
  492. brief = "STM32F External Interrupt 4..0",
  493. description = "Interrupt Configuration for external interrups through GPIO.",
  494. requires = { "HW_MCU_STM32", "HW_EXTI04_STM32" },
  495. sources = { "cm3/dev/stm/ih_stm32_exti0.c",
  496. "cm3/dev/stm/ih_stm32_exti1.c",
  497. "cm3/dev/stm/ih_stm32_exti2.c",
  498. "cm3/dev/stm/ih_stm32_exti3.c",
  499. "cm3/dev/stm/ih_stm32_exti4.c",
  500. }
  501. },
  502. {
  503. name = "nutarch_cm3_stm32_devices_exti95",
  504. brief = "STM32F External Interrupts 9..5",
  505. description = "Interrupt Configuration for external interrups through GPIO.",
  506. requires = { "HW_MCU_STM32", "HW_EXTI95_STM32" },
  507. sources = { "cm3/dev/stm/ih_stm32_exti9_5.c" }
  508. },
  509. {
  510. name = "nutarch_cm3_stm32_devices_exti1510",
  511. brief = "STM32F External Interrupts 15..10",
  512. description = "Interrupt Configuration for external interrups through GPIO.",
  513. requires = { "HW_MCU_STM32", "HW_EXTI1510_STM32" },
  514. sources = { "cm3/dev/stm/ih_stm32_exti15_10.c" }
  515. },
  516. --
  517. -- STM32 CEC V2 on STM32F373
  518. --
  519. {
  520. name = "nutarch_cm3_stm32_cec_v2",
  521. brief = "STM32 CEC V2",
  522. description = "STM32 CEC V2 on STM32F37X.",
  523. requires = { "HW_CEC_STM32V3" },
  524. provides = { "HW_CEC_STM32" },
  525. },
  526. --
  527. -- STM32 32 bit Timers
  528. --
  529. {
  530. name = "nutarch_cm3_stm32_timer2_32bit",
  531. brief = "STM32 Timer2 32Bit",
  532. description = "STM32 Timer infrastructure.",
  533. requires = { "HW_TIM2_32BIT_STM32" },
  534. provides = { "HW_TIM2_STM32" , "HW_STM32_TIMER_32BIT" },
  535. },
  536. {
  537. name = "nutarch_cm3_stm32_qenc32_0",
  538. brief = "STM32 32Bit Quadrature Encoder0",
  539. description = "STM32 32Bit Quadrature Encoder 0.",
  540. requires = { "HW_STM32_TIMER_32BIT" },
  541. sources = { "cm3/dev/stm/stm32_qenc32_0.c" },
  542. options =
  543. {
  544. {
  545. macro = "STM32_QENC32_0_TIMER_ID",
  546. brief = "STM32 32Bit Quadrature Encoder Timer ID",
  547. description = "Select Timer for 32 bit Quadrature Enoder",
  548. type = "enumerated",
  549. choices = function() return GetStmTimers32bit() end,
  550. file = "include/cfg/qenc.h",
  551. },
  552. {
  553. macro = "STM32_QENC32_0_I_PORT",
  554. brief = "STM32 qenc32 I input port",
  555. description = "STM32 32Bit Quadrature Encoder I input port. Can by TI1 or TI2",
  556. requires = { "HW_STM32_TIMER_32BIT" },
  557. type = "enumerated",
  558. choices = function() return GetGpioBanks() end,
  559. file = "include/cfg/qenc.h",
  560. },
  561. {
  562. macro = "STM32_QENC32_0_I_PIN",
  563. brief = "STM32 qenc32 I input pin",
  564. description = "STM32 32Bit Quadrature Encoder I input pin. Can by TI1 or TI2",
  565. requires = { "HW_STM32_TIMER_32BIT" },
  566. type = "enumerated",
  567. choices = function() return GetGpioBits() end,
  568. file = "include/cfg/qenc.h",
  569. },
  570. {
  571. macro = "STM32_QENC32_0_Q_PORT",
  572. brief = "STM32 qenc32 Q input port",
  573. description = "STM32 32Bit Quadrature Encoder I input port. Can by TI1 or TI2",
  574. requires = { "HW_STM32_TIMER_32BIT" },
  575. type = "enumerated",
  576. choices = function() return GetGpioBanks() end,
  577. file = "include/cfg/qenc.h",
  578. },
  579. {
  580. macro = "STM32_QENC32_0_Q_PIN",
  581. brief = "STM32 qenc32 Q input pin",
  582. description = "STM32 32Bit Quadrature Encoder I input pin. Can by TI1 or TI2",
  583. requires = { "HW_STM32_TIMER_32BIT" },
  584. type = "enumerated",
  585. choices = function() return GetGpioBits() end,
  586. file = "include/cfg/qenc.h",
  587. },
  588. {
  589. macro = "STM32_QENC32_0_INVERT",
  590. brief = "STM32 qenc32 reverse count direction",
  591. description = "STM32 32Bit Quadrature Encoder reverse count direction. Effective exchanges I and Q.",
  592. flavor = "booldata",
  593. file = "include/cfg/qenc.h",
  594. },
  595. },
  596. },
  597. --
  598. -- STM32 16bit Timers for Encode
  599. --
  600. {
  601. name = "nutarch_cm3_stm32_qenc16_0",
  602. brief = "STM32 32 Bit Quadrature Encoder0 using 16 bit timer",
  603. description = "STM32 32Bit Quadrature Encoder 0.",
  604. sources = { "cm3/dev/stm/stm32_qenc16_0.c" },
  605. options =
  606. {
  607. {
  608. macro = "STM32_QENC16_0_TIMER_ID",
  609. brief = "STM32 32Bit Quadrature Encoder using 16 bit timer Timer ID",
  610. description = "Select Timer for 16 bit Quadrature Enoder",
  611. type = "enumerated",
  612. choices = function() return GetStmTimers2Ch() end,
  613. file = "include/cfg/qenc.h",
  614. },
  615. {
  616. macro = "STM32_QENC16_0_I_PORT",
  617. brief = "STM32 qenc16 I input port",
  618. description = "STM32 32Bit Quadrature Encoder using 16 bit timer I input port. Can by TI1 or TI2",
  619. type = "enumerated",
  620. choices = function() return GetGpioBanks() end,
  621. file = "include/cfg/qenc.h",
  622. },
  623. {
  624. macro = "STM32_QENC16_0_I_PIN",
  625. brief = "STM32 qenc16 I input pin",
  626. description = "STM32 32Bit Quadrature Encoder using 16 bit timer I input pin. Can by TI1 or TI2",
  627. type = "enumerated",
  628. choices = function() return GetGpioBits() end,
  629. file = "include/cfg/qenc.h",
  630. },
  631. {
  632. macro = "STM32_QENC16_0_Q_PORT",
  633. brief = "STM32 qenc16 Q input port",
  634. description = "STM32 32Bit Quadrature Encoder using 16 bit timer I input port. Can by TI1 or TI2",
  635. type = "enumerated",
  636. choices = function() return GetGpioBanks() end,
  637. file = "include/cfg/qenc.h",
  638. },
  639. {
  640. macro = "STM32_QENC16_0_Q_PIN",
  641. brief = "STM32 qenc16 Q input pin",
  642. description = "STM32 32Bit Quadrature Encoder using 16 bit timer I input pin. Can by TI1 or TI2",
  643. type = "enumerated",
  644. choices = function() return GetGpioBits() end,
  645. file = "include/cfg/qenc.h",
  646. },
  647. {
  648. macro = "STM32_QENC16_0_INVERT",
  649. brief = "STM32 qenc16 reverse count direction",
  650. description = "STM32 32Bit Quadrature Encoder using 16 bit timer reverse count direction. Effective exchanges I and Q.",
  651. flavor = "booldata",
  652. file = "include/cfg/qenc.h",
  653. },
  654. },
  655. },
  656. --
  657. -- STM32F USART1 Interface
  658. --
  659. {
  660. name = "nutarch_cm3_stm32_devices_usart1",
  661. brief = "STM32 USART1 Driver",
  662. description = "Hardware specific USART driver. Implements hardware "..
  663. "functions for the generic driver framework.",
  664. requires = { "HW_USART1_STM32", "DEV_IRQ_STM32", "NUT_EVENT", "CRT_HEAPMEM" },
  665. provides =
  666. {
  667. "DEV_UART",
  668. "DEV_UART_STM32",
  669. "DEV_UART_SPECIFIC",
  670. "DEV_UART1_GPIO_RTS",
  671. "DEV_UART1_GPIO_CTS",
  672. "DEV_UART1_GPIO_HDX"
  673. },
  674. sources =
  675. {
  676. "cm3/dev/stm/stm32_usart1.c",
  677. },
  678. options =
  679. {
  680. {
  681. macro = "USART1_REMAP_USART",
  682. brief = "Use Alternate Pins",
  683. description = "Leaving this option unchecked, the driver will initialize the standard Pins.\n\n"..
  684. "Pin Mapping is:\n TXD PA9\n RXD PA10 \n CTS PB13\n RTS PB14"..
  685. "Enabling the option the driver remaps RXD and TXD to its alternate port pins:\n\n"..
  686. "Pin Mapping is:\n TXD PB6\n RXD PB7\n CTS PB13\n RTS PB14"..
  687. "For L1/F2/F4 Pins may also get assigned individually",
  688. flavor = "booldata",
  689. file = "include/cfg/uart.h"
  690. },
  691. {
  692. macro = "USART1_TX_PIN",
  693. brief = "USART1 TX Pin selection",
  694. description = "Choose USART1 TX Pin, Default: PA9. Use -1 for not used.",
  695. requires = { "HW_GPIO_STM32V2" },
  696. type = "enumerated",
  697. choices = function() return GetTxUsart1() end,
  698. file = "include/cfg/uart.h"
  699. },
  700. {
  701. macro = "USART1_RX_PIN",
  702. brief = "USART1 RX Pin selection",
  703. description = "Choose USART1 RX Pin, Default: PA10. Use -1 for not used.",
  704. requires = { "HW_GPIO_STM32V2" },
  705. type = "enumerated",
  706. choices = function() return GetRxUsart1() end,
  707. file = "include/cfg/uart.h"
  708. },
  709. {
  710. macro = "USART1_TX_PIN_INV",
  711. brief = "USART1 TX Pin inversion",
  712. description = "Invert USART1 TX",
  713. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  714. flavor = "booldata",
  715. file = "include/cfg/uart.h"
  716. },
  717. {
  718. macro = "USART1_RX_PIN_INV",
  719. brief = "USART1 RX Pin inversion",
  720. description = "USART1 RX Pin inversion",
  721. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  722. flavor = "booldata",
  723. file = "include/cfg/uart.h"
  724. },
  725. {
  726. macro = "USART1_SWAP",
  727. brief = "Swap USART1 TX/RX pins",
  728. description = "Swap USART1 TX/RX pins",
  729. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  730. flavor = "booldata",
  731. file = "include/cfg/uart.h"
  732. },
  733. {
  734. macro = "USART1_HARDWARE_HANDSHAKE",
  735. brief = "Hardware Handshake",
  736. description = "When selected, the driver will support RTS/CTS hardware handshake.\n"..
  737. "The related GPIO pins are initialized automatically.",
  738. flavor = "booldata",
  739. file = "include/cfg/uart.h"
  740. },
  741. {
  742. macro = "USART1_HARDWARE_HDX",
  743. brief = "Half Duplex Mode",
  744. description = "When selected, the driver will be configured for half-duplex mode.\n",
  745. flavor = "booldata",
  746. provides = { "USART1_HARDWARE_HDX" },
  747. file = "include/cfg/uart.h"
  748. },
  749. {
  750. macro = "USART1_1WIRE",
  751. brief = "1Wire Mode",
  752. description = "In this mode the UARTs RX pin is not connected but the TX pin is used "..
  753. "in bidirectional mode.",
  754. flavor = "booldata",
  755. requires = { "USART1_HARDWARE_HDX" },
  756. file = "include/cfg/uart.h"
  757. },
  758. {
  759. macro = "USART1_XONXOFF_CONTROL",
  760. brief = "XON/XOFF Protocol",
  761. description = "When selected, the driver will use software XON/XOFF protocol.",
  762. flavor = "booldata",
  763. file = "include/cfg/uart.h"
  764. },
  765. {
  766. macro = "USART1_INIT_BAUDRATE",
  767. brief = "Initial Baudrate",
  768. description = "Initial baudrate the Port is set to.",
  769. type = "integer",
  770. default = 115200,
  771. file = "include/cfg/uart.h"
  772. },
  773. {
  774. macro = "USART1_SUPPORT_IRQ",
  775. brief = "Use Interrupt Transfer",
  776. description = "When selected, the driver will use interrupt for transfers. ",
  777. flavor = "booldata",
  778. provides = { "USART1_SUPPORT_IRQ" },
  779. file = "include/cfg/uart.h"
  780. },
  781. {
  782. macro = "USART1_SUPPORT_DMA",
  783. brief = "Support DMA Blocktransfer",
  784. description = "When selected, the driver can use DMA for block transfers.\n"..
  785. "Block transfers can be enabled or disabled by calling _ioctl "..
  786. "with the following parameters:\n"..
  787. "UART_SETBLOCKREAD\nUART_SETBLOCKWRITE",
  788. flavor = "booldata",
  789. requires = { "USART1_SUPPORT_IRQ" },
  790. file = "include/cfg/uart.h"
  791. },
  792. {
  793. macro = "USART1_MODE_IRDA",
  794. brief = "Set To IrDA Mode",
  795. description = "When selected, the USART will run in IrDA mode.",
  796. flavor = "booldata",
  797. file = "include/cfg/uart.h"
  798. },
  799. {
  800. macro = "USART1_RS485_CTRL",
  801. brief = "Support RS485 control",
  802. description = "When selected a GPIO pin must be configured for RS485 direction control.",
  803. flavor = "booldata",
  804. provides = { "USART1_RS485_CTRL" },
  805. file = "include/cfg/uart.h"
  806. },
  807. {
  808. macro = "USART1_485DE_INV",
  809. brief = "RS485 DE Invert",
  810. description = "Sets the DE signal as active low.\n",
  811. requires = { "USART1_RS485_CTRL" },
  812. flavor = "booldata",
  813. file = "include/cfg/uart.h"
  814. },
  815. {
  816. macro = "USART1_485DE_PORT",
  817. brief = "RS485 DE Control Port",
  818. description = "Select the port of the DE signal.\n",
  819. requires = { "USART1_RS485_CTRL" },
  820. flavor = "booldata",
  821. type = "enumerated",
  822. choices = function() return GetGpioBanks() end,
  823. file = "include/cfg/uart.h"
  824. },
  825. {
  826. macro = "USART1_485DE_PIN",
  827. brief = "RS485 DE Control Pin",
  828. description = "Select the pin for the DE signal.\n",
  829. requires = { "USART1_RS485_CTRL" },
  830. flavor = "booldata",
  831. type = "enumerated",
  832. choices = function() return GetGpioBits() end,
  833. file = "include/cfg/uart.h"
  834. },
  835. {
  836. macro = "USART1_485RE_INV",
  837. brief = "RS485 RE Invert",
  838. description = "Sets the RE signal as active high.\n",
  839. requires = { "USART1_RS485_CTRL" },
  840. flavor = "booldata",
  841. file = "include/cfg/uart.h"
  842. },
  843. {
  844. macro = "USART1_485RE_PORT",
  845. brief = "RS485 /RE Control Port",
  846. description = "Select the port of the /RE signal.\n",
  847. requires = { "USART1_RS485_CTRL" },
  848. flavor = "booldata",
  849. type = "enumerated",
  850. choices = function() return GetGpioBanks() end,
  851. file = "include/cfg/uart.h"
  852. },
  853. {
  854. macro = "USART1_485RE_PIN",
  855. brief = "RS485 /RE Control Pin",
  856. description = "Select the pin for the /RE signal.\n",
  857. requires = { "USART1_RS485_CTRL" },
  858. flavor = "booldata",
  859. type = "enumerated",
  860. choices = function() return GetGpioBits() end,
  861. file = "include/cfg/uart.h"
  862. },
  863. -- {
  864. -- macro = "USART1_MODE_LIN",
  865. -- brief = "Set To LIN Mode",
  866. -- description = "When selected, the USART will be configured for LIN bus.",
  867. -- flavor = "booldata",
  868. -- file = "include/cfg/uart.h"
  869. -- },
  870. -- {
  871. -- macro = "USART1_RXTX_ONLY",
  872. -- brief = "Receive/Transmit Only",
  873. -- description = "When selected, the driver will not support any handshake signals.",
  874. -- flavor = "boolean",
  875. -- exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
  876. -- file = "include/cfg/uart.h"
  877. -- },
  878. -- {
  879. -- macro = "USART1_MODEM_CONTROL",
  880. -- brief = "Full Modem Control",
  881. -- description = "When selected, the driver will support full modem control. "..
  882. -- "Make sure, that all related peripheral pins are available.",
  883. -- flavor = "boolean",
  884. -- exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
  885. -- requires = { "HW_UART0_MODEM" },
  886. -- file = "include/cfg/uart.h"
  887. -- },
  888. },
  889. },
  890. --
  891. -- STM32F USART2 Interface
  892. --
  893. {
  894. name = "nutarch_cm3_stm32f_usart2",
  895. brief = "STM32 USART2 Driver",
  896. description = "Hardware specific USART driver. Implements hardware "..
  897. "functions for the generic driver framework.",
  898. requires = { "HW_USART2_STM32", "NUT_EVENT", "CRT_HEAPMEM" },
  899. provides =
  900. {
  901. "DEV_UART",
  902. "DEV_UART_STM32",
  903. "DEV_UART_SPECIFIC",
  904. "DEV_UART2_GPIO_RTS",
  905. "DEV_UART2_GPIO_CTS",
  906. "DEV_UART2_GPIO_HDX"
  907. },
  908. sources =
  909. {
  910. "cm3/dev/stm/stm32_usart2.c",
  911. },
  912. options =
  913. {
  914. {
  915. macro = "USART2_REMAP_USART",
  916. brief = "Use Alternate Pins",
  917. description = "Leaving this option unchecked, the driver will initialize the standard Pins.\n\n"..
  918. "Pin Mapping is:\n TXD PA2\n RXD PA3 \n CTS PA0\n RTS PA1"..
  919. "Enabling the option the driver remaps RXD and TXD to its alternate port pins:\n\n"..
  920. "Pin Mapping is:\n TXD PD5\n RXD PD6\n CTS PD3\n RTS PD4"..
  921. "For L1/F2/F4 Pins may also get assigned individually",
  922. flavor = "booldata",
  923. file = "include/cfg/uart.h"
  924. },
  925. {
  926. macro = "USART2_TX_PIN",
  927. brief = "USART2 TX Pin selection",
  928. description = "Choose USART2 TX Pin, default: PA2. Use -1 for not used.",
  929. requires = { "HW_GPIO_STM32V2" },
  930. type = "enumerated",
  931. choices = function() return GetTxUsart2() end,
  932. file = "include/cfg/uart.h"
  933. },
  934. {
  935. macro = "USART2_RX_PIN",
  936. brief = "USART2 RX Pin selection",
  937. description = "Choose USART2 RX Pin, default: PA3. Use -1 for not used.",
  938. requires = { "HW_GPIO_STM32V2" },
  939. type = "enumerated",
  940. choices = function() return GetTxUsart2() end,
  941. file = "include/cfg/uart.h"
  942. },
  943. {
  944. macro = "USART2_TX_PIN_INV",
  945. brief = "USART2 TX Pin inversion",
  946. description = "Invert USART2 TX",
  947. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  948. flavor = "booldata",
  949. file = "include/cfg/uart.h"
  950. },
  951. {
  952. macro = "USART2_RX_PIN_INV",
  953. brief = "USART2 RX Pin inversion",
  954. description = "USART2 RX Pin inversion",
  955. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  956. flavor = "booldata",
  957. file = "include/cfg/uart.h"
  958. },
  959. {
  960. macro = "USART2_SWAP",
  961. brief = "Swap USART2 TX/RX pins",
  962. description = "Swap USART2 TX/RX pins",
  963. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  964. flavor = "booldata",
  965. file = "include/cfg/uart.h"
  966. },
  967. {
  968. macro = "USART2_CK_PIN",
  969. brief = "USART2 CK Pin selection",
  970. description = "Choose USART2 CK Pin from PA4(default)and PD7",
  971. requires = { "HW_GPIO_STM32V2" },
  972. type = "enumerated",
  973. choices = { "4", "7" },
  974. file = "include/cfg/uart.h"
  975. },
  976. {
  977. macro = "USART2_CTS_PIN",
  978. brief = "USART2 CTS Pin selection",
  979. description = "Choose USART2 CTS Pin from PA0(default) and PD3",
  980. requires = { "HW_GPIO_STM32V2", "USART2_HARDWARE_HANDSHAKE" },
  981. type = "enumerated",
  982. choices = { "0", "3" },
  983. file = "include/cfg/uart.h"
  984. },
  985. {
  986. macro = "USART2_RTS_PIN",
  987. brief = "USART2 RTS Pin selection",
  988. description = "Choose USART2 RTS Pin from PA1(default) and PD2",
  989. requires = { "HW_GPIO_STM32V2", "USART2_HARDWARE_HANDSHAKE" },
  990. type = "enumerated",
  991. choices = { "1", "2" },
  992. file = "include/cfg/uart.h"
  993. },
  994. {
  995. macro = "USART2_HARDWARE_HANDSHAKE",
  996. brief = "Hardware Handshake",
  997. description = "When selected, the driver will support RTS/CTS hardware handshake. "..
  998. "The related GPIO pins are initialized automatically.",
  999. flavor = "booldata",
  1000. file = "include/cfg/uart.h"
  1001. },
  1002. {
  1003. macro = "USART2_HARDWARE_HDX",
  1004. brief = "Half Duplex Mode",
  1005. description = "When selected, the driver will be configured for half-duplex mode.\n",
  1006. provides = { "USART2_HARDWARE_HDX" },
  1007. flavor = "booldata",
  1008. file = "include/cfg/uart.h"
  1009. },
  1010. {
  1011. macro = "USART2_1WIRE",
  1012. brief = "1Wire Mode",
  1013. description = "In this mode the UARTs RX pin is not connected but the TX pin is used "..
  1014. "in bidirectional mode.",
  1015. flavor = "booldata",
  1016. requires = { "USART2_HARDWARE_HDX" },
  1017. file = "include/cfg/uart.h"
  1018. },
  1019. {
  1020. macro = "USART2_XONXOFF_CONTROL",
  1021. brief = "XON/XOFF Protocol",
  1022. description = "When selected, the driver will use software XON/XOFF protocol.",
  1023. flavor = "booldata",
  1024. file = "include/cfg/uart.h"
  1025. },
  1026. {
  1027. macro = "USART2_INIT_BAUDRATE",
  1028. brief = "Initial Baudrate",
  1029. description = "Initial baudrate the Port is set to.",
  1030. type = "integer",
  1031. default = 115200,
  1032. file = "include/cfg/uart.h"
  1033. },
  1034. {
  1035. macro = "USART2_SUPPORT_IRQ",
  1036. brief = "Use Interrupt Transfer",
  1037. description = "When selected, the driver will use interrupt for transfers. ",
  1038. flavor = "booldata",
  1039. provides = { "USART2_SUPPORT_IRQ" },
  1040. file = "include/cfg/uart.h"
  1041. },
  1042. {
  1043. macro = "USART2_SUPPORT_DMA",
  1044. brief = "Support DMA Blocktransfer",
  1045. description = "When selected, the driver can use DMA for block transfers.\n"..
  1046. "Block transfers can be enabled or disabled by calling _ioctl "..
  1047. "with the following parameters:\n"..
  1048. "UART_SETBLOCKREAD\nUART_SETBLOCKWRITE",
  1049. flavor = "booldata",
  1050. requires = { "USART2_SUPPORT_IRQ" },
  1051. file = "include/cfg/uart.h"
  1052. },
  1053. {
  1054. macro = "USART2_MODE_IRDA",
  1055. brief = "Set To IrDA Mode",
  1056. description = "When selected, the USART will run in IrDA mode.",
  1057. flavor = "booldata",
  1058. file = "include/cfg/uart.h"
  1059. },
  1060. {
  1061. macro = "USART2_RS485_CTRL",
  1062. brief = "Support RS485 control",
  1063. description = "When selected a GPIO pin must be configured for RS485 direction control.",
  1064. flavor = "booldata",
  1065. provides = { "USART2_RS485_CTRL" },
  1066. file = "include/cfg/uart.h"
  1067. },
  1068. {
  1069. macro = "USART2_485DE_INV",
  1070. brief = "RS485 DE Invert",
  1071. description = "Sets the DE signal as active low.\n",
  1072. requires = { "USART2_RS485_CTRL" },
  1073. flavor = "booldata",
  1074. file = "include/cfg/uart.h"
  1075. },
  1076. {
  1077. macro = "USART2_485DE_PORT",
  1078. brief = "RS485 DE Control Port",
  1079. description = "Select the port of the DE signal.\n",
  1080. requires = { "USART2_RS485_CTRL" },
  1081. flavor = "booldata",
  1082. type = "enumerated",
  1083. choices = function() return GetGpioBanks() end,
  1084. file = "include/cfg/uart.h"
  1085. },
  1086. {
  1087. macro = "USART2_485DE_PIN",
  1088. brief = "RS485 DE Control Pin",
  1089. description = "Select the pin for the DE signal.\n",
  1090. requires = { "USART2_RS485_CTRL" },
  1091. flavor = "booldata",
  1092. type = "enumerated",
  1093. choices = function() return GetGpioBits() end,
  1094. file = "include/cfg/uart.h"
  1095. },
  1096. {
  1097. macro = "USART2_485RE_INV",
  1098. brief = "RS485 RE Invert",
  1099. description = "Sets the RE signal as active high.\n",
  1100. requires = { "USART2_RS485_CTRL" },
  1101. flavor = "booldata",
  1102. file = "include/cfg/uart.h"
  1103. },
  1104. {
  1105. macro = "USART2_485RE_PORT",
  1106. brief = "RS485 /RE Control Port",
  1107. description = "Select the port of the /RE signal.\n",
  1108. requires = { "USART2_RS485_CTRL" },
  1109. flavor = "booldata",
  1110. type = "enumerated",
  1111. choices = function() return GetGpioBanks() end,
  1112. file = "include/cfg/uart.h"
  1113. },
  1114. {
  1115. macro = "USART2_485RE_PIN",
  1116. brief = "RS485 /RE Control Pin",
  1117. description = "Select the pin for the /RE signal.\n",
  1118. requires = { "USART2_RS485_CTRL" },
  1119. flavor = "booldata",
  1120. type = "enumerated",
  1121. choices = function() return GetGpioBits() end,
  1122. file = "include/cfg/uart.h"
  1123. },
  1124. -- {
  1125. -- macro = "USART2_MODE_LIN",
  1126. -- brief = "Set To LIN Mode",
  1127. -- description = "When selected, the USART will be configured for LIN bus.",
  1128. -- flavor = "booldata",
  1129. -- file = "include/cfg/uart.h"
  1130. -- },
  1131. -- {
  1132. -- macro = "UART2_RXTX_ONLY",
  1133. -- brief = "Receive/Transmit Only",
  1134. -- description = "When selected, the driver will not support any handshake signals.",
  1135. -- flavor = "boolean",
  1136. -- exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
  1137. -- file = "include/cfg/uart.h"
  1138. -- },
  1139. -- {
  1140. -- macro = "UART2_MODEM_CONTROL",
  1141. -- brief = "Full Modem Control",
  1142. -- description = "When selected, the driver will support full modem control. "..
  1143. -- "Make sure, that all related peripheral pins are available.",
  1144. -- flavor = "boolean",
  1145. -- exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
  1146. -- requires = { "HW_UART1_MODEM" },
  1147. -- file = "include/cfg/uart.h"
  1148. -- },
  1149. },
  1150. },
  1151. --
  1152. -- STM32F USART3 Interface
  1153. --
  1154. {
  1155. name = "nutarch_cm3_stm32_devices_usart3",
  1156. brief = "STM32 USART3 Driver",
  1157. description = "Hardware specific USART driver. Implements hardware "..
  1158. "functions for the generic driver framework.",
  1159. requires = { "HW_USART3_STM32", "DEV_IRQ_STM32", "NUT_EVENT", "CRT_HEAPMEM" },
  1160. provides =
  1161. {
  1162. "DEV_UART",
  1163. "DEV_UART_STM32",
  1164. "DEV_UART_SPECIFIC",
  1165. "DEV_UART3_GPIO_RTS",
  1166. "DEV_UART3_GPIO_CTS",
  1167. "DEV_UART3_GPIO_HDX"
  1168. },
  1169. sources =
  1170. {
  1171. "cm3/dev/stm/stm32_usart3.c",
  1172. },
  1173. options =
  1174. {
  1175. {
  1176. macro = "USART3_NOREMAP_USART",
  1177. brief = "Use Default Pins",
  1178. description = "When selected, the driver will initialize the standard Pins.\n\n"..
  1179. "Pin Mapping is:\n TXD B10\n RXD PB11 \n CTS PB13\n RTS PB14"..
  1180. "For L1/F2/F4 Pins may also get assigned individually",
  1181. flavor = "booldata",
  1182. exclusivity = { "USART3_NOREMAP_USART", "USART3_PARTREMAP_USART", "USART3_FULLREMAP_USART" },
  1183. file = "include/cfg/uart.h"
  1184. },
  1185. {
  1186. macro = "USART3_PARTREMAP_USART",
  1187. brief = "Partial Remap Pins",
  1188. description = "When selected, the driver will initialize the alternate pins in\n"..
  1189. "a partially remapped configuration:\n\n"..
  1190. "Pin Mapping is:\n TXD PC10\n RXD PC11\n CTS PB13\n RTS PB14"..
  1191. "For L1/F2/F4 Pins may also get assigned individually",
  1192. flavor = "booldata",
  1193. exclusivity = { "USART3_NOREMAP_USART", "USART3_PARTREMAP_USART", "USART3_FULLREMAP_USART" },
  1194. file = "include/cfg/uart.h"
  1195. },
  1196. {
  1197. macro = "USART3_FULLREMAP_USART",
  1198. brief = "Full Remap Pins",
  1199. description = "When selected, the driver will initialize the alternate pins in\n"..
  1200. "a fully remapped configuration:\n\n"..
  1201. "Pin Mapping is:\n TXD PD8\n RXD PD9\n CTS PD11\n RTS PD12"..
  1202. "For L1/F2/F4 Pins may also get assigned individually",
  1203. flavor = "booldata",
  1204. exclusivity = { "USART3_NOREMAP_USART", "USART3_PARTREMAP_USART", "USART3_FULLREMAP_USART" },
  1205. file = "include/cfg/uart.h"
  1206. },
  1207. {
  1208. macro = "USART3_TX_PIN",
  1209. brief = "USART3 TX Pin selection",
  1210. description = "Choose USART3 TX Pin, default: PB10. Use -1 for not used.",
  1211. requires = { "HW_GPIO_STM32V2" },
  1212. type = "enumerated",
  1213. choices = { "10", "310", "8" },
  1214. file = "include/cfg/uart.h"
  1215. },
  1216. {
  1217. macro = "USART3_RX_PIN",
  1218. brief = "USART3 RX Pin selection",
  1219. description = "Choose USART3 RX Pin, default: PB11. Use -1 for not used.",
  1220. requires = { "HW_GPIO_STM32V2" },
  1221. type = "enumerated",
  1222. choices = function() return GetTxUsart3() end,
  1223. file = "include/cfg/uart.h"
  1224. },
  1225. {
  1226. macro = "USART3_TX_PIN_INV",
  1227. brief = "USART3 TX Pin inversion",
  1228. description = "Invert USART3 TX",
  1229. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  1230. flavor = "booldata",
  1231. file = "include/cfg/uart.h"
  1232. },
  1233. {
  1234. macro = "USART3_RX_PIN_INV",
  1235. brief = "USART3 RX Pin inversion",
  1236. description = "USART3 RX Pin inversion",
  1237. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  1238. flavor = "booldata",
  1239. file = "include/cfg/uart.h"
  1240. },
  1241. {
  1242. macro = "USART3_SWAP",
  1243. brief = "Swap USART3 TX/RX pins",
  1244. description = "Swap USART3 TX/RX pins",
  1245. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  1246. flavor = "booldata",
  1247. file = "include/cfg/uart.h"
  1248. },
  1249. {
  1250. macro = "USART3_CK_PIN",
  1251. brief = "USART3 CK Pin selection",
  1252. description = "Choose USART3 CK Pin from PB12(default), PC12 and PD10",
  1253. requires = { "HW_GPIO_STM32V2" },
  1254. type = "enumerated",
  1255. choices = { "12", "312", "10" },
  1256. file = "include/cfg/uart.h"
  1257. },
  1258. {
  1259. macro = "USART3_CTS_PIN",
  1260. brief = "USART3 CTS Pin selection",
  1261. description = "Choose USART3 CTS Pin from PB13(default) and PD11",
  1262. requires = { "HW_GPIO_STM32V2", "USART3_HARDWARE_HANDSHAKE" },
  1263. type = "enumerated",
  1264. default = "13",
  1265. choices = { "13", "11" },
  1266. file = "include/cfg/uart.h"
  1267. },
  1268. {
  1269. macro = "USART3_RTS_PIN",
  1270. brief = "USART3 RTS Pin selection",
  1271. description = "Choose USART3 RTS Pin from PB14(default) and PD12",
  1272. requires = { "HW_GPIO_STM32V2", "USART3_HARDWARE_HANDSHAKE" },
  1273. type = "enumerated",
  1274. choices = { "14", "12" },
  1275. file = "include/cfg/uart.h"
  1276. },
  1277. {
  1278. macro = "USART3_HARDWARE_HANDSHAKE",
  1279. brief = "Hardware Handshake",
  1280. description = "When selected, the driver will support RTS/CTS hardware handshake. "..
  1281. "The related GPIO pins are initialized automatically.",
  1282. provides = { "USART3_HARDWARE_HANDSHAKE" },
  1283. flavor = "booldata",
  1284. file = "include/cfg/uart.h"
  1285. },
  1286. {
  1287. macro = "USART3_HARDWARE_HDX",
  1288. brief = "Half Duplex Mode",
  1289. description = "When selected, the driver will be configured for half-duplex mode.\n",
  1290. provides = { "USART3_HARDWARE_HDX" },
  1291. flavor = "booldata",
  1292. file = "include/cfg/uart.h"
  1293. },
  1294. {
  1295. macro = "USART3_1WIRE",
  1296. brief = "1Wire Mode",
  1297. description = "In this mode the UARTs RX pin is not connected but the TX pin is used "..
  1298. "in bidirectional mode.",
  1299. flavor = "booldata",
  1300. requires = { "USART3_HARDWARE_HDX" },
  1301. file = "include/cfg/uart.h"
  1302. },
  1303. {
  1304. macro = "USART3_XONXOFF_CONTROL",
  1305. brief = "XON/XOFF Protocol",
  1306. description = "When selected, the driver will use software XON/XOFF protocol.",
  1307. flavor = "booldata",
  1308. file = "include/cfg/uart.h"
  1309. },
  1310. {
  1311. macro = "USART3_INIT_BAUDRATE",
  1312. brief = "Initial Baudrate",
  1313. description = "Initial baudrate the Port is set to.",
  1314. type = "integer",
  1315. default = 115200,
  1316. file = "include/cfg/uart.h"
  1317. },
  1318. {
  1319. macro = "USART3_SUPPORT_IRQ",
  1320. brief = "Use Interrupt Transfer",
  1321. description = "When selected, the driver will use interrupt for transfers. ",
  1322. flavor = "booldata",
  1323. provides = { "USART2_SUPPORT_IRQ" },
  1324. file = "include/cfg/uart.h"
  1325. },
  1326. {
  1327. macro = "USART3_SUPPORT_DMA",
  1328. brief = "Support DMA Blocktransfer",
  1329. description = "When selected, the driver can use DMA for block transfers.\n"..
  1330. "Block transfers can be enabled or disabled by calling _ioctl "..
  1331. "with the following parameters:\n"..
  1332. "UART_SETBLOCKREAD\nUART_SETBLOCKWRITE",
  1333. flavor = "booldata",
  1334. requires = { "USART2_SUPPORT_IRQ" },
  1335. file = "include/cfg/uart.h"
  1336. },
  1337. {
  1338. macro = "USART3_MODE_IRDA",
  1339. brief = "Set To IrDA Mode",
  1340. description = "When selected, the USART will run in IrDA mode.",
  1341. flavor = "booldata",
  1342. file = "include/cfg/uart.h"
  1343. },
  1344. {
  1345. macro = "USART3_RS485_CTRL",
  1346. brief = "Support RS485 control",
  1347. description = "When selected a GPIO pin must be configured for RS485 direction control.",
  1348. flavor = "booldata",
  1349. provides = { "USART3_RS485_CTRL" },
  1350. file = "include/cfg/uart.h"
  1351. },
  1352. {
  1353. macro = "USART3_485DE_INV",
  1354. brief = "RS485 DE Invert",
  1355. description = "Sets the DE signal as active low.\n",
  1356. requires = { "USART3_RS485_CTRL" },
  1357. flavor = "booldata",
  1358. file = "include/cfg/uart.h"
  1359. },
  1360. {
  1361. macro = "USART3_485DE_PORT",
  1362. brief = "RS485 DE Control Port",
  1363. description = "Select the port of the DE signal.\n",
  1364. requires = { "USART3_RS485_CTRL" },
  1365. flavor = "booldata",
  1366. type = "enumerated",
  1367. choices = function() return GetGpioBanks() end,
  1368. file = "include/cfg/uart.h"
  1369. },
  1370. {
  1371. macro = "USART3_485DE_PIN",
  1372. brief = "RS485 DE Control Pin",
  1373. description = "Select the pin for the DE signal.\n",
  1374. requires = { "USART3_RS485_CTRL" },
  1375. flavor = "booldata",
  1376. type = "enumerated",
  1377. choices = function() return GetGpioBits() end,
  1378. file = "include/cfg/uart.h"
  1379. },
  1380. {
  1381. macro = "USART3_485RE_INV",
  1382. brief = "RS485 RE Invert",
  1383. description = "Sets the RE signal as active high.\n",
  1384. requires = { "USART3_RS485_CTRL" },
  1385. flavor = "booldata",
  1386. file = "include/cfg/uart.h"
  1387. },
  1388. {
  1389. macro = "USART3_485RE_PORT",
  1390. brief = "RS485 /RE Control Port",
  1391. description = "Select the port of the /RE signal.\n",
  1392. requires = { "USART3_RS485_CTRL" },
  1393. flavor = "booldata",
  1394. type = "enumerated",
  1395. choices = function() return GetGpioBanks() end,
  1396. file = "include/cfg/uart.h"
  1397. },
  1398. {
  1399. macro = "USART3_485RE_PIN",
  1400. brief = "RS485 /RE Control Pin",
  1401. description = "Select the pin for the /RE signal.\n",
  1402. requires = { "USART3_RS485_CTRL" },
  1403. flavor = "booldata",
  1404. type = "enumerated",
  1405. choices = function() return GetGpioBits() end,
  1406. file = "include/cfg/uart.h"
  1407. },
  1408. -- {
  1409. -- macro = "USART3_MODE_LIN",
  1410. -- brief = "Set To LIN Mode",
  1411. -- description = "When selected, the USART will be configured for LIN bus.",
  1412. -- flavor = "booldata",
  1413. -- file = "include/cfg/uart.h"
  1414. -- },
  1415. -- {
  1416. -- macro = "USART3_RXTX_ONLY",
  1417. -- brief = "Receive/Transmit Only",
  1418. -- description = "When selected, the driver will not support any handshake signals.",
  1419. -- flavor = "boolean",
  1420. -- exclusivity = { "UART3_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
  1421. -- file = "include/cfg/uart.h"
  1422. -- },
  1423. -- {
  1424. -- macro = "USART3_MODEM_CONTROL",
  1425. -- brief = "Full Modem Control",
  1426. -- description = "When selected, the driver will support full modem control. "..
  1427. -- "Make sure, that all related peripheral pins are available.",
  1428. -- flavor = "boolean",
  1429. -- exclusivity = { "UART3_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
  1430. -- requires = { "HW_UART1_MODEM" },
  1431. -- file = "include/cfg/uart.h"
  1432. -- },
  1433. },
  1434. },
  1435. --
  1436. -- STM32F UART4 Interface
  1437. --
  1438. {
  1439. name = "nutarch_cm3_stm32f_uart4",
  1440. brief = "STM32 UART4 Driver",
  1441. description = "Hardware specific UART driver. Implements hardware "..
  1442. "functions for the generic driver framework.",
  1443. requires = { "HW_UART4_STM32", "DEV_IRQ_STM32", "NUT_EVENT", "CRT_HEAPMEM" },
  1444. provides =
  1445. {
  1446. "DEV_UART",
  1447. "DEV_UART_STM32",
  1448. "DEV_UART_SPECIFIC",
  1449. "DEV_UART4_GPIO_HDX"
  1450. },
  1451. sources =
  1452. {
  1453. "cm3/dev/stm/stm32_uart4.c",
  1454. },
  1455. options =
  1456. {
  1457. {
  1458. macro = "UART4_REMAP_USART",
  1459. brief = "Use Alternate Pins",
  1460. description = "Leaving this option unchecked, the driver will initialize the standard Pins.\n\n"..
  1461. "Pin Mapping is:\n TXD PA0\n RXD PA1"..
  1462. "Enabling the option the driver remaps RXD and TXD to its alternate port pins:\n\n"..
  1463. "Pin Mapping is:\n TXD PC10\n RXD PC11"..
  1464. "For L1/F2/F4 Pins may also get assigned individually",
  1465. flavor = "booldata",
  1466. file = "include/cfg/uart.h"
  1467. },
  1468. {
  1469. macro = "UART4_TX_PIN",
  1470. brief = "UART4 TX Pin selection",
  1471. description = "Choose UART4 TX Pin, default: PA0. Use -1 for not used.",
  1472. requires = { "HW_GPIO_STM32V2" },
  1473. type = "enumerated",
  1474. choices = function() return GetTxUsart4() end,
  1475. file = "include/cfg/uart.h"
  1476. },
  1477. {
  1478. macro = "UART4_RX_PIN",
  1479. brief = "UART4 RX Pin selection",
  1480. description = "Choose UART4 RX Pin, default: PA1. Use -1 for not used.",
  1481. requires = { "HW_GPIO_STM32V2" },
  1482. type = "enumerated",
  1483. choices = function() return GetRxUsart4() end,
  1484. file = "include/cfg/uart.h"
  1485. },
  1486. {
  1487. macro = "USART4_TX_PIN_INV",
  1488. brief = "USART4 TX Pin inversion",
  1489. description = "Invert USART4 TX",
  1490. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  1491. flavor = "booldata",
  1492. file = "include/cfg/uart.h"
  1493. },
  1494. {
  1495. macro = "USART4_RX_PIN_INV",
  1496. brief = "USART4 RX Pin inversion",
  1497. description = "USART4 RX Pin inversion",
  1498. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  1499. flavor = "booldata",
  1500. file = "include/cfg/uart.h"
  1501. },
  1502. {
  1503. macro = "USART4_SWAP",
  1504. brief = "Swap USART4 TX/RX pins",
  1505. description = "Swap USART4 TX/RX pins",
  1506. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  1507. flavor = "booldata",
  1508. file = "include/cfg/uart.h"
  1509. },
  1510. {
  1511. macro = "UART4_HARDWARE_HDX",
  1512. brief = "Half Duplex Mode",
  1513. description = "When selected, the driver will be configured for half-duplex mode.\n",
  1514. provides = { "UART4_HARDWARE_HDX" },
  1515. flavor = "booldata",
  1516. file = "include/cfg/uart.h"
  1517. },
  1518. {
  1519. macro = "UART4_1WIRE",
  1520. brief = "1Wire Mode",
  1521. description = "In this mode the UARTs RX pin is not connected but the TX pin is used "..
  1522. "in bidirectional mode.",
  1523. flavor = "booldata",
  1524. requires = { "UART4_HARDWARE_HDX" },
  1525. file = "include/cfg/uart.h"
  1526. },
  1527. {
  1528. macro = "UART4_XONXOFF_CONTROL",
  1529. brief = "XON/XOFF Protocol",
  1530. description = "When selected, the driver will use software XON/XOFF protocol.",
  1531. flavor = "booldata",
  1532. file = "include/cfg/uart.h"
  1533. },
  1534. {
  1535. macro = "UART4_INIT_BAUDRATE",
  1536. brief = "Initial Baudrate",
  1537. description = "Initial baudrate the Port is set to.",
  1538. type = "integer",
  1539. default = 115200,
  1540. file = "include/cfg/uart.h"
  1541. },
  1542. {
  1543. macro = "UART4_SUPPORT_IRQ",
  1544. brief = "Use Interrupt Transfer",
  1545. description = "When selected, the driver will use interrupt for transfers. ",
  1546. flavor = "booldata",
  1547. provides = { "UART4_SUPPORT_IRQ" },
  1548. file = "include/cfg/uart.h"
  1549. },
  1550. {
  1551. macro = "UART4_SUPPORT_DMA",
  1552. brief = "Support DMA Blocktransfer",
  1553. description = "When selected, the driver can use DMA for block transfers.\n"..
  1554. "Block transfers can be enabled or disabled by calling _ioctl "..
  1555. "with the following parameters:\n"..
  1556. "UART_SETBLOCKREAD\nUART_SETBLOCKWRITE",
  1557. flavor = "booldata",
  1558. requires = { "UART4_SUPPORT_IRQ" },
  1559. file = "include/cfg/uart.h"
  1560. },
  1561. {
  1562. macro = "UART4_MODE_IRDA",
  1563. brief = "Set To IrDA Mode",
  1564. description = "When selected, the UART will run in IrDA mode.",
  1565. flavor = "booldata",
  1566. file = "include/cfg/uart.h"
  1567. },
  1568. {
  1569. macro = "UART4_RS485_CTRL",
  1570. brief = "Support RS485 control",
  1571. description = "When selected a GPIO pin must be configured for RS485 direction control.",
  1572. flavor = "booldata",
  1573. provides = { "UART4_RS485_CTRL" },
  1574. file = "include/cfg/uart.h"
  1575. },
  1576. {
  1577. macro = "UART4_485DE_INV",
  1578. brief = "RS485 DE Invert",
  1579. description = "Sets the DE signal as active low.\n",
  1580. requires = { "UART4_RS485_CTRL" },
  1581. flavor = "booldata",
  1582. file = "include/cfg/uart.h"
  1583. },
  1584. {
  1585. macro = "UART4_485DE_PORT",
  1586. brief = "RS485 DE Control Port",
  1587. description = "Select the port of the DE signal.\n",
  1588. requires = { "UART4_RS485_CTRL" },
  1589. flavor = "booldata",
  1590. type = "enumerated",
  1591. choices = function() return GetGpioBanks() end,
  1592. file = "include/cfg/uart.h"
  1593. },
  1594. {
  1595. macro = "UART4_485DE_PIN",
  1596. brief = "RS485 DE Control Pin",
  1597. description = "Select the pin for the DE signal.\n",
  1598. requires = { "UART4_RS485_CTRL" },
  1599. flavor = "booldata",
  1600. type = "enumerated",
  1601. choices = function() return GetGpioBits() end,
  1602. file = "include/cfg/uart.h"
  1603. },
  1604. {
  1605. macro = "UART4_485RE_INV",
  1606. brief = "RS485 RE Invert",
  1607. description = "Sets the RE signal as active high.\n",
  1608. requires = { "UART4_RS485_CTRL" },
  1609. flavor = "booldata",
  1610. file = "include/cfg/uart.h"
  1611. },
  1612. {
  1613. macro = "UART4_485RE_PORT",
  1614. brief = "RS485 /RE Control Port",
  1615. description = "Select the port of the /RE signal.\n",
  1616. requires = { "UART4_RS485_CTRL" },
  1617. flavor = "booldata",
  1618. type = "enumerated",
  1619. choices = function() return GetGpioBanks() end,
  1620. file = "include/cfg/uart.h"
  1621. },
  1622. {
  1623. macro = "UART4_485RE_PIN",
  1624. brief = "RS485 /RE Control Pin",
  1625. description = "Select the pin for the /RE signal.\n",
  1626. requires = { "UART4_RS485_CTRL" },
  1627. flavor = "booldata",
  1628. type = "enumerated",
  1629. choices = function() return GetGpioBits() end,
  1630. file = "include/cfg/uart.h"
  1631. },
  1632. -- {
  1633. -- macro = "UART4_MODE_LIN",
  1634. -- brief = "Set To LIN Mode",
  1635. -- description = "When selected, the UART will be configured for LIN bus.",
  1636. -- flavor = "booldata",
  1637. -- file = "include/cfg/uart.h"
  1638. -- },
  1639. -- {
  1640. -- macro = "UART4_RXTX_ONLY",
  1641. -- brief = "Receive/Transmit Only",
  1642. -- description = "When selected, the driver will not support any handshake signals.",
  1643. -- flavor = "boolean",
  1644. -- exclusivity = { "UART4_RXTX_ONLY", "UART4_HARDWARE_HANDSHAKE", "UART4_MODEM_CONTROL" },
  1645. -- file = "include/cfg/uart.h"
  1646. -- },
  1647. -- {
  1648. -- macro = "UART4_MODEM_CONTROL",
  1649. -- brief = "Full Modem Control",
  1650. -- description = "When selected, the driver will support full modem control. "..
  1651. -- "Make sure, that all related peripheral pins are available.",
  1652. -- flavor = "boolean",
  1653. -- exclusivity = { "UART4_RXTX_ONLY", "UART4_HARDWARE_HANDSHAKE", "UART4_MODEM_CONTROL" },
  1654. -- requires = { "HW_UART1_MODEM" },
  1655. -- file = "include/cfg/uart.h"
  1656. -- },
  1657. },
  1658. },
  1659. --
  1660. -- STM32F UART5 Interface
  1661. --
  1662. {
  1663. name = "nutarch_cm3_stm32f_uart5",
  1664. brief = "STM32 UART5 Driver",
  1665. description = "Hardware specific UART driver. Implements hardware "..
  1666. "functions for the generic driver framework.",
  1667. requires = { "HW_UART5_STM32", "DEV_IRQ_STM32", "NUT_EVENT", "CRT_HEAPMEM" },
  1668. provides =
  1669. {
  1670. "DEV_UART",
  1671. "DEV_UART_SPECIFIC",
  1672. "DEV_UART5_GPIO_HDX"
  1673. },
  1674. sources =
  1675. {
  1676. "cm3/dev/stm/stm32_uart5.c",
  1677. },
  1678. options =
  1679. {
  1680. {
  1681. macro = "USART5_TX_PIN_INV",
  1682. brief = "USART5 TX Pin inversion",
  1683. description = "Invert USART5 TX",
  1684. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  1685. flavor = "booldata",
  1686. file = "include/cfg/uart.h"
  1687. },
  1688. {
  1689. macro = "USART5_RX_PIN_INV",
  1690. brief = "USART5 RX Pin inversion",
  1691. description = "USART5 RX Pin inversion",
  1692. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  1693. flavor = "booldata",
  1694. file = "include/cfg/uart.h"
  1695. },
  1696. {
  1697. macro = "USART5_SWAP",
  1698. brief = "Swap USART5 TX/RX pins",
  1699. description = "Swap USART5 TX/RX pins",
  1700. requires = { "HW_GPIO_STM32V2", "STM32F3XX" },
  1701. flavor = "booldata",
  1702. file = "include/cfg/uart.h"
  1703. },
  1704. {
  1705. macro = "UART5_HARDWARE_HDX",
  1706. brief = "Half Duplex Mode",
  1707. description = "When selected, the driver will be configured for half-duplex mode.\n",
  1708. provides = { "UART5_HARDWARE_HDX" },
  1709. flavor = "booldata",
  1710. file = "include/cfg/uart.h"
  1711. },
  1712. {
  1713. macro = "UART5_1WIRE",
  1714. brief = "1Wire Mode",
  1715. description = "In this mode the UARTs RX pin is not connected but the TX pin is used "..
  1716. "in bidirectional mode.",
  1717. flavor = "booldata",
  1718. requires = { "UART5_HARDWARE_HDX" },
  1719. file = "include/cfg/uart.h"
  1720. },
  1721. {
  1722. macro = "UART5_XONXOFF_CONTROL",
  1723. brief = "XON/XOFF Protocol",
  1724. description = "When selected, the driver will use software XON/XOFF protocol.",
  1725. flavor = "booldata",
  1726. file = "include/cfg/uart.h"
  1727. },
  1728. {
  1729. macro = "UART5_INIT_BAUDRATE",
  1730. brief = "Initial Baudrate",
  1731. description = "Initial baudrate the Port is set to.",
  1732. type = "integer",
  1733. default = 115200,
  1734. file = "include/cfg/uart.h"
  1735. },
  1736. {
  1737. macro = "UART5_SUPPORT_IRQ",
  1738. brief = "Use Interrupt Transfer",
  1739. description = "When selected, the driver will use interrupt for transfers. ",
  1740. flavor = "booldata",
  1741. provides = { "UART5_SUPPORT_IRQ" },
  1742. file = "include/cfg/uart.h"
  1743. },
  1744. {
  1745. macro = "UART5_MODE_IRDA",
  1746. brief = "Set To IrDA Mode",
  1747. description = "When selected, the UART will run in IrDA mode.",
  1748. flavor = "booldata",
  1749. file = "include/cfg/uart.h"
  1750. },
  1751. {
  1752. macro = "UART5_RS485_CTRL",
  1753. brief = "Support RS485 control",
  1754. description = "When selected a GPIO pin must be configured for RS485 direction control.",
  1755. flavor = "booldata",
  1756. provides = { "UART5_RS485_CTRL" },
  1757. file = "include/cfg/uart.h"
  1758. },
  1759. {
  1760. macro = "UART5_485DE_INV",
  1761. brief = "RS485 DE Invert",
  1762. description = "Sets the DE signal as active low.\n",
  1763. requires = { "UART5_RS485_CTRL" },
  1764. flavor = "booldata",
  1765. file = "include/cfg/uart.h"
  1766. },
  1767. {
  1768. macro = "UART5_485DE_PORT",
  1769. brief = "RS485 DE Control Port",
  1770. description = "Select the port of the DE signal.\n",
  1771. requires = { "UART5_RS485_CTRL" },
  1772. flavor = "booldata",
  1773. type = "enumerated",
  1774. choices = function() return GetGpioBanks() end,
  1775. file = "include/cfg/uart.h"
  1776. },
  1777. {
  1778. macro = "UART5_485DE_PIN",
  1779. brief = "RS485 DE Control Pin",
  1780. description = "Select the pin for the DE signal.\n",
  1781. requires = { "UART5_RS485_CTRL" },
  1782. flavor = "booldata",
  1783. type = "enumerated",
  1784. choices = function() return GetGpioBits() end,
  1785. file = "include/cfg/uart.h"
  1786. },
  1787. {
  1788. macro = "UART5_485RE_INV",
  1789. brief = "RS485 RE Invert",
  1790. description = "Sets the RE signal as active high.\n",
  1791. requires = { "UART5_RS485_CTRL" },
  1792. flavor = "booldata",
  1793. file = "include/cfg/uart.h"
  1794. },
  1795. {
  1796. macro = "USART35_485RE_PORT",
  1797. brief = "RS485 /RE Control Port",
  1798. description = "Select the port of the /RE signal.\n",
  1799. requires = { "UART5_RS485_CTRL" },
  1800. flavor = "booldata",
  1801. type = "enumerated",
  1802. choices = function() return GetGpioBanks() end,
  1803. file = "include/cfg/uart.h"
  1804. },
  1805. {
  1806. macro = "UART5_485RE_PIN",
  1807. brief = "RS485 /RE Control Pin",
  1808. description = "Select the pin for the /RE signal.\n",
  1809. requires = { "UART5_RS485_CTRL" },
  1810. flavor = "booldata",
  1811. type = "enumerated",
  1812. choices = function() return GetGpioBits() end,
  1813. file = "include/cfg/uart.h"
  1814. },
  1815. -- {
  1816. -- macro = "UART5_MODE_LIN",
  1817. -- brief = "Set To LIN Mode",
  1818. -- description = "When selected, the UART will be configured for LIN bus.",
  1819. -- flavor = "booldata",
  1820. -- file = "include/cfg/uart.h"
  1821. -- },
  1822. -- {
  1823. -- macro = "UART5_RXTX_ONLY",
  1824. -- brief = "Receive/Transmit Only",
  1825. -- description = "When selected, the driver will not support any handshake signals.",
  1826. -- flavor = "boolean",
  1827. -- exclusivity = { "UART5_RXTX_ONLY", "UART5_HARDWARE_HANDSHAKE", "UART5_MODEM_CONTROL" },
  1828. -- file = "include/cfg/uart.h"
  1829. -- },
  1830. -- {
  1831. -- macro = "UART5_MODEM_CONTROL",
  1832. -- brief = "Full Modem Control",
  1833. -- description = "When selected, the driver will support full modem control. "..
  1834. -- "Make sure, that all related peripheral pins are available.",
  1835. -- flavor = "boolean",
  1836. -- exclusivity = { "UART5_RXTX_ONLY", "UART5_HARDWARE_HANDSHAKE", "UART5_MODEM_CONTROL" },
  1837. -- requires = { "HW_UART5_MODEM" },
  1838. -- file = "include/cfg/uart.h"
  1839. -- },
  1840. },
  1841. },
  1842. --
  1843. -- STM32F USART6 Interface
  1844. --
  1845. {
  1846. name = "nutarch_cm3_stm32_devices_usart6",
  1847. brief = "STM32 USART6 Driver",
  1848. description = "Hardware specific USART driver. Implements hardware "..
  1849. "functions for the generic driver framework.",
  1850. requires = { "HW_USART6_STM32", "DEV_IRQ_STM32", "NUT_EVENT", "CRT_HEAPMEM" },
  1851. provides =
  1852. {
  1853. "DEV_UART",
  1854. "DEV_UART_STM32",
  1855. "DEV_UART_SPECIFIC",
  1856. "DEV_UART6_GPIO_RTS",
  1857. "DEV_UART6_GPIO_CTS",
  1858. "DEV_UART6_GPIO_HDX"
  1859. },
  1860. sources =
  1861. {
  1862. "cm3/dev/stm/stm32_usart6.c",
  1863. },
  1864. options =
  1865. {
  1866. {
  1867. macro = "USART6_REMAP_USART",
  1868. brief = "Use Alternate Pins",
  1869. description = "Leaving this option unchecked, the driver will initialize the standard Pins.\n\n"..
  1870. "Pin Mapping is:\n TXD PC6\n RXD PC7 \n CTS PG13\n RTS PG8\n CK PC8"..
  1871. "Enabling the option the driver remaps RXD and TXD to its alternate port pins:\n\n"..
  1872. "Pin Mapping is:\n TXD PG14\n RXD PG9\n CTS PG15\n RTS PG12\n CK PG7"..
  1873. "For L1/F2/F4 Pins may also get assigned individually",
  1874. flavor = "booldata",
  1875. file = "include/cfg/uart.h"
  1876. },
  1877. {
  1878. macro = "USART6_TX_PIN",
  1879. brief = "USART6 TX Pin selection",
  1880. description = "Choose USART6 TX Pin from PC6(default) and PG14 or not used(-1)",
  1881. requires = { "HW_GPIO_STM32V2" },
  1882. type = "enumerated",
  1883. choices = { "6", "14", "-1" },
  1884. file = "include/cfg/uart.h"
  1885. },
  1886. {
  1887. macro = "USART6_RX_PIN",
  1888. brief = "USART6 RX Pin selection",
  1889. description = "Choose USART6 RX Pin from PC7(default) and PG9 or not used(-1)",
  1890. requires = { "HW_GPIO_STM32V2" },
  1891. type = "enumerated",
  1892. choices = { "7", "9", "-1" },
  1893. file = "include/cfg/uart.h"
  1894. },
  1895. {
  1896. macro = "USART6_CK_PIN",
  1897. brief = "USART6 CK Pin selection",
  1898. description = "Choose USART3 CK Pin from PC8(default) and PG7",
  1899. requires = { "HW_GPIO_STM32V2" },
  1900. type = "enumerated",
  1901. default = "8",
  1902. choices = { "8", "7" },
  1903. file = "include/cfg/uart.h"
  1904. },
  1905. {
  1906. macro = "USART6_CTS_PIN",
  1907. brief = "USART6 CTS Pin selection",
  1908. description = "Choose USART6 CTS Pin from PG13(default) and PG15",
  1909. requires = { "HW_GPIO_STM32V2", "USART3_HARDWARE_HANDSHAKE" },
  1910. type = "enumerated",
  1911. choices = { "13", "15" },
  1912. file = "include/cfg/uart.h"
  1913. },
  1914. {
  1915. macro = "USART6_RTS_PIN",
  1916. brief = "USART6 RTS Pin selection",
  1917. description = "Choose USART6 RTS Pin from PG8(default) and PG12",
  1918. requires = { "HW_GPIO_STM32V2", "USART3_HARDWARE_HANDSHAKE" },
  1919. type = "enumerated",
  1920. choices = { "8", "12" },
  1921. file = "include/cfg/uart.h"
  1922. },
  1923. {
  1924. macro = "USART6_HARDWARE_HANDSHAKE",
  1925. brief = "Hardware Handshake",
  1926. description = "When selected, the driver will support RTS/CTS hardware handshake.\n"..
  1927. "The related GPIO pins are initialized automatically.",
  1928. flavor = "booldata",
  1929. file = "include/cfg/uart.h"
  1930. },
  1931. {
  1932. macro = "USART6_HARDWARE_HDX",
  1933. brief = "Half Duplex Mode",
  1934. description = "When selected, the driver will be configured for half-duplex mode.\n",
  1935. flavor = "booldata",
  1936. provides = { "USART6_HARDWARE_HDX" },
  1937. file = "include/cfg/uart.h"
  1938. },
  1939. {
  1940. macro = "USART6_1WIRE",
  1941. brief = "1Wire Mode",
  1942. description = "In this mode the UARTs RX pin is not connected but the TX pin is used "..
  1943. "in bidirectional mode.",
  1944. flavor = "booldata",
  1945. requires = { "USART6_HARDWARE_HDX" },
  1946. file = "include/cfg/uart.h"
  1947. },
  1948. {
  1949. macro = "USART6_XONXOFF_CONTROL",
  1950. brief = "XON/XOFF Protocol",
  1951. description = "When selected, the driver will use software XON/XOFF protocol.",
  1952. flavor = "booldata",
  1953. file = "include/cfg/uart.h"
  1954. },
  1955. {
  1956. macro = "USART6_INIT_BAUDRATE",
  1957. brief = "Initial Baudrate",
  1958. description = "Initial baudrate the Port is set to.",
  1959. type = "integer",
  1960. default = 115200,
  1961. file = "include/cfg/uart.h"
  1962. },
  1963. {
  1964. macro = "USART6_SUPPORT_IRQ",
  1965. brief = "Use Interrupt Transfer",
  1966. description = "When selected, the driver will use interrupt for transfers. ",
  1967. flavor = "booldata",
  1968. provides = { "USART6_SUPPORT_IRQ" },
  1969. file = "include/cfg/uart.h"
  1970. },
  1971. {
  1972. macro = "USART6_SUPPORT_DMA",
  1973. brief = "Support DMA Blocktransfer",
  1974. description = "When selected, the driver can use DMA for block transfers.\n"..
  1975. "Block transfers can be enabled or disabled by calling _ioctl "..
  1976. "with the following parameters:\n"..
  1977. "UART_SETBLOCKREAD\nUART_SETBLOCKWRITE",
  1978. flavor = "booldata",
  1979. requires = { "USART6_SUPPORT_IRQ" },
  1980. file = "include/cfg/uart.h"
  1981. },
  1982. {
  1983. macro = "USART6_MODE_IRDA",
  1984. brief = "Set To IrDA Mode",
  1985. description = "When selected, the USART will run in IrDA mode.",
  1986. flavor = "booldata",
  1987. file = "include/cfg/uart.h"
  1988. },
  1989. {
  1990. macro = "USART6_RS485_CTRL",
  1991. brief = "Support RS485 control",
  1992. description = "When selected a GPIO pin must be configured for RS485 direction control.",
  1993. flavor = "booldata",
  1994. provides = { "USART6_RS485_CTRL" },
  1995. file = "include/cfg/uart.h"
  1996. },
  1997. {
  1998. macro = "USART6_485DE_INV",
  1999. brief = "RS485 DE Invert",
  2000. description = "Sets the DE signal as active low.\n",
  2001. requires = { "USART6_RS485_CTRL" },
  2002. flavor = "booldata",
  2003. file = "include/cfg/uart.h"
  2004. },
  2005. {
  2006. macro = "USART6_485DE_PORT",
  2007. brief = "RS485 DE Control Port",
  2008. description = "Select the port of the DE signal.\n",
  2009. requires = { "USART6_RS485_CTRL" },
  2010. flavor = "booldata",
  2011. type = "enumerated",
  2012. choices = function() return GetGpioBanks() end,
  2013. file = "include/cfg/uart.h"
  2014. },
  2015. {
  2016. macro = "USART6_485DE_PIN",
  2017. brief = "RS485 DE Control Pin",
  2018. description = "Select the pin for the DE signal.\n",
  2019. requires = { "USART6_RS485_CTRL" },
  2020. flavor = "booldata",
  2021. type = "enumerated",
  2022. choices = function() return GetGpioBits() end,
  2023. file = "include/cfg/uart.h"
  2024. },
  2025. {
  2026. macro = "USART6_485RE_INV",
  2027. brief = "RS485 RE Invert",
  2028. description = "Sets the RE signal as active high.\n",
  2029. requires = { "USART6_RS485_CTRL" },
  2030. flavor = "booldata",
  2031. file = "include/cfg/uart.h"
  2032. },
  2033. {
  2034. macro = "USART6_485RE_PORT",
  2035. brief = "RS485 /RE Control Port",
  2036. description = "Select the port of the /RE signal.\n",
  2037. requires = { "USART6_RS485_CTRL" },
  2038. flavor = "booldata",
  2039. type = "enumerated",
  2040. choices = function() return GetGpioBanks() end,
  2041. file = "include/cfg/uart.h"
  2042. },
  2043. {
  2044. macro = "USART6_485RE_PIN",
  2045. brief = "RS485 /RE Control Pin",
  2046. description = "Select the pin for the /RE signal.\n",
  2047. requires = { "USART6_RS485_CTRL" },
  2048. flavor = "booldata",
  2049. type = "enumerated",
  2050. choices = function() return GetGpioBits() end,
  2051. file = "include/cfg/uart.h"
  2052. },
  2053. -- {
  2054. -- macro = "USART6_MODE_LIN",
  2055. -- brief = "Set To LIN Mode",
  2056. -- description = "When selected, the USART will be configured for LIN bus.",
  2057. -- flavor = "booldata",
  2058. -- file = "include/cfg/uart.h"
  2059. -- },
  2060. -- {
  2061. -- macro = "USART6_RXTX_ONLY",
  2062. -- brief = "Receive/Transmit Only",
  2063. -- description = "When selected, the driver will not support any handshake signals.",
  2064. -- flavor = "boolean",
  2065. -- exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
  2066. -- file = "include/cfg/uart.h"
  2067. -- },
  2068. -- {
  2069. -- macro = "USART6_MODEM_CONTROL",
  2070. -- brief = "Full Modem Control",
  2071. -- description = "When selected, the driver will support full modem control. "..
  2072. -- "Make sure, that all related peripheral pins are available.",
  2073. -- flavor = "boolean",
  2074. -- exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
  2075. -- requires = { "HW_UART0_MODEM" },
  2076. -- file = "include/cfg/uart.h"
  2077. -- },
  2078. },
  2079. },
  2080. --
  2081. -- STM32F EMAC Configuration
  2082. --
  2083. {
  2084. name = "nutarch_cm3_stm32f_emac",
  2085. brief = "STM32F EMAC Driver",
  2086. description = "LAN driver for STM32Fxx7xx.",
  2087. requires = { "HW_EMAC_STM32", "NUT_EVENT", "NUT_TIMER" },
  2088. provides = { "NET_MAC" },
  2089. sources = { "cm3/dev/stm/stm32_emac.c" },
  2090. options =
  2091. {
  2092. {
  2093. macro = "EMAC_REMAP",
  2094. brief = "Use Alternate Pins",
  2095. description = "Leaving this option unchecked, the driver will initialize the standard Pins.\n\n"..
  2096. "Pin Mapping is:\n RX_DV-CRS PA7\n RXD0 PC4 \n RXD1 PC5\n RXD2 PB0\n RXD3 PB1\n"..
  2097. "Enabling the option the driver remaps to its alternate port pins:\n\n"..
  2098. "Pin Mapping is:\n RX_DV-CRS PD8\n RXD0 PD9 \n RXD1 PD10\n RXD2 PD11\n RXD3 PD12\n",
  2099. flavor = "booldata",
  2100. file = "include/cfg/dev.h"
  2101. },
  2102. {
  2103. macro = "PHY_PWRDN_BIT",
  2104. brief = "PHY Power Down Bit",
  2105. description = "For the SAM7X default is 18.\n\n",
  2106. provides = { "PHY_PWRDN_CONTROL" },
  2107. flavor = "booldata",
  2108. type = "enumerated",
  2109. choices = mcu_32bit_choice,
  2110. file = "include/cfg/arch/armpio.h"
  2111. },
  2112. {
  2113. macro = "PHY_PWRDN_NEGPOL",
  2114. brief = "PHY Power Down Polarity",
  2115. description = "Select this, if the PHY is powered down by a low signal.",
  2116. requires = { "PHY_PWRDN_CONTROL" },
  2117. flavor = "boolean",
  2118. file = "include/cfg/arch/armpio.h"
  2119. },
  2120. {
  2121. macro = "NUT_THREAD_NICRXSTACK",
  2122. brief = "Receiver Thread Stack",
  2123. description = "Number of bytes to be allocated for the stack of the NIC receive thread.",
  2124. flavor = "booldata",
  2125. type = "integer",
  2126. file = "include/cfg/dev.h"
  2127. },
  2128. {
  2129. macro = "EMAC_RX_BUFFERS",
  2130. brief = "Receive Buffers",
  2131. description = "Number of 128 byte receive buffers.\n"..
  2132. "Increase to handle high traffic situations.\n"..
  2133. "Decrease to handle low memory situations.\n"..
  2134. "Default is 32.\n",
  2135. flavor = "booldata",
  2136. type = "integer",
  2137. file = "include/cfg/dev.h"
  2138. },
  2139. {
  2140. macro = "EMAC_TX_BUFSIZ",
  2141. brief = "Transmit Buffer Size",
  2142. description = "The driver will allocate two transmit buffers.\n"..
  2143. "Can be decreased in low memory situations. Be aware, "..
  2144. "that this may break your network application. Do not "..
  2145. "change this without exactly knowing the consequences.\n"..
  2146. "Default is 1536.\n",
  2147. flavor = "booldata",
  2148. type = "integer",
  2149. file = "include/cfg/dev.h"
  2150. },
  2151. {
  2152. macro = "EMAC_LINK_LOOPS",
  2153. brief = "Link Polling Loops",
  2154. description = "This simple implementation runs a dumb polling loop "..
  2155. "while waiting for the Ethernet link status.\n"..
  2156. "If you experience link problems, increasing this value "..
  2157. "may help.\n"..
  2158. "Default is 10000.\n",
  2159. flavor = "booldata",
  2160. type = "integer",
  2161. file = "include/cfg/dev.h"
  2162. },
  2163. }
  2164. },
  2165. --
  2166. -- STM32F I2C Bus 1 Configuration
  2167. --
  2168. {
  2169. name = "nutarch_cm3_stm32f_i2c1",
  2170. brief = "STM32F I2C Bus 1 Controller",
  2171. description = "STM32F hardware I2C support.",
  2172. requires = { "HW_I2C1_STM32" },
  2173. provides = { "DEV_TWI" },
  2174. sources =
  2175. {
  2176. "cm3/dev/stm/stm32_twi1.c",
  2177. "cm3/dev/stm/stm32_twi.c"
  2178. },
  2179. options =
  2180. {
  2181. {
  2182. macro = "I2CBUS1_AS_DEFAULT",
  2183. brief = "Use as default I2C",
  2184. description = "Enabling this options reconfigures TwiXxx() Macros to use this bus.\n"..
  2185. "This is for compatibility with Nut/OS.",
  2186. exclusivity = { "I2CBUS1_AS_DEFAULT", "I2CBUS2_AS_DEFAULT" },
  2187. flavor = "booldata",
  2188. file = "include/cfg/twi.h"
  2189. },
  2190. {
  2191. macro = "I2CBUS1_REMAP_I2C",
  2192. brief = "Use Alternate Pins",
  2193. description = "Leaving this option unchecked, the driver will initialize the standard Pins.\n\n"..
  2194. "Pin Mapping is:\n SCL PB6\n SDA PB7\n"..
  2195. "By enabling the option alternate port pins are used:\n\n"..
  2196. "Pin Mapping is:\n SCL PB8\n SDA PB9\n"..
  2197. "For L1/F2/F4 Pins may also get assigned individually",
  2198. flavor = "booldata",
  2199. file = "include/cfg/twi.h"
  2200. },
  2201. {
  2202. macro = "I2CBUS1_SCL_PIN",
  2203. brief = "I2C1 SCL Pins",
  2204. description = "Pin for I2C1 SCL, Default PB6 or PB8",
  2205. requires = { "HW_GPIO_STM32V2" },
  2206. type = "enumerated",
  2207. choices = { "6", "8" },
  2208. file = "include/cfg/twi.h"
  2209. },
  2210. {
  2211. macro = "I2CBUS1_SDA_PIN",
  2212. brief = "I2C1 SDA Pins",
  2213. description = "Pin for I2C1 SDA, Default PB7 or PB11",
  2214. requires = { "HW_GPIO_STM32V2" },
  2215. type = "enumerated",
  2216. choices = { "7", "9" },
  2217. file = "include/cfg/twi.h"
  2218. },
  2219. {
  2220. macro = "I2CBUS1_DEFAULT_SPEED",
  2221. brief = "Default Speed",
  2222. description = "Default speed for this bus. Different speeds can be set by software.\n",
  2223. default = "100",
  2224. type = "boolean",
  2225. choices = { "75", "100", "400" },
  2226. file = "include/cfg/twi.h"
  2227. },
  2228. {
  2229. macro = "I2CBUS1_USE_DMA",
  2230. brief = "Use DMA with I2C1",
  2231. description = "Enabling this options configures I2C bus to use DMA.\n\n"..
  2232. "Errata Sheet 14574 Rev.9:\n"..
  2233. "This should be default for STM32F10xxB/8 devices according this Errata "..
  2234. "to overcome the mentioned limitations.",
  2235. flavor = "booldata",
  2236. file = "include/cfg/twi.h"
  2237. },
  2238. {
  2239. macro = "I2CBUS1_MODE_SMBUS",
  2240. brief = "Enable SMBUS",
  2241. description = "Enabling this options adds SM-Bus functions and initializes the Alert line GPIO.\n"..
  2242. "For this bus SMBA is PB5.",
  2243. -- requires = { "NOT_AVAILABLE" },
  2244. flavor = "booldata",
  2245. file = "include/cfg/twi.h"
  2246. },
  2247. },
  2248. },
  2249. --
  2250. -- STM32F I2C Bus 2 Configuration
  2251. --
  2252. {
  2253. name = "nutarch_cm3_stm32f_i2c2",
  2254. brief = "STM32F I2C Bus 2 Controller",
  2255. description = "STM32F hardware I2C support.\n\n This bus cannot be remapped on F1/L1. Pins used are:\n"..
  2256. "SCL PB10\nSDA PB11\n",
  2257. requires = { "HW_I2C2_STM32" },
  2258. provides = { "DEV_TWI" },
  2259. sources =
  2260. {
  2261. "cm3/dev/stm/stm32_twi2.c",
  2262. "cm3/dev/stm/stm32_twi.c"
  2263. },
  2264. options =
  2265. {
  2266. {
  2267. macro = "I2CBUS2_AS_DEFAULT",
  2268. brief = "Use as default I2C",
  2269. description = "Enabling this options reconfigures TwiXxx() Macros to use this bus.\n"..
  2270. "This is for compatibility with Nut/OS.",
  2271. exclusivity = { "I2CBUS1_AS_DEFAULT", "I2CBUS2_AS_DEFAULT" },
  2272. flavor = "booldata",
  2273. file = "include/cfg/twi.h"
  2274. },
  2275. {
  2276. macro = "I2CBUS2_SCL_PIN",
  2277. brief = "I2C2 SCL Pins",
  2278. requires = { "HW_GPIO_STM32V2" },
  2279. description = "Choose I2C2 SCL Pin PB10(default) and on F2/F4 PF1 or PH4",
  2280. type = "enumerated",
  2281. choices = function() if c_is_provided("HW_MCU_STM32L1") then return { "10" } else return { "10", "1", "4" } end; end,
  2282. file = "include/cfg/twi.h"
  2283. },
  2284. {
  2285. macro = "I2CBUS2_SDA_PIN",
  2286. brief = "I2C2 SDA Pins",
  2287. requires = { "HW_GPIO_STM32V2" },
  2288. description = "Choose I2C2 SDA Pin PB11(dafault) and on F2/F4 PF0 or PH5",
  2289. type = "enumerated",
  2290. choices = function() if c_is_provided("HW_MCU_STM32L1") then return { "11" } else return { "11", "0", "5" } end; end,
  2291. file = "include/cfg/twi.h"
  2292. },
  2293. {
  2294. macro = "I2CBUS2_SMBA_PIN",
  2295. brief = "I2C2 SMBA Pins",
  2296. requires = { "HW_GPIO_STM32V2" },
  2297. description = "Choose I2C2 SMBA Pin PB12(default) and on F2/F4 PF2 or PH6",
  2298. type = "enumerated",
  2299. choices = function() if c_is_provided("HW_MCU_STM32L1") then return { "12" } else return { "12", "2", "6" } end; end,
  2300. file = "include/cfg/twi.h"
  2301. },
  2302. {
  2303. macro = "I2CBUS2_DEFAULT_SPEED",
  2304. brief = "Default Speed",
  2305. description = "Default speed for this bus. Different speeds can be set by software.\n",
  2306. default = "100",
  2307. type = "boolean",
  2308. choices = { "75", "100", "400" },
  2309. file = "include/cfg/twi.h"
  2310. },
  2311. {
  2312. macro = "I2CBUS2_USE_DMA",
  2313. brief = "Use DMA with I2C2",
  2314. description = "Enabling this options configures I2C bus to use DMA.\n"..
  2315. "This should be default for STM32F10xxB/8 devices according Errata Sheet 14574 Rev.9.\n"..
  2316. "to overcome the mentioned limitations.",
  2317. flavor = "booldata",
  2318. file = "include/cfg/twi.h"
  2319. },
  2320. {
  2321. macro = "I2CBUS2_MODE_SMBUS",
  2322. brief = "Enable SMBUS",
  2323. description = "Enabling this options adds SM-Bus functions and initializes the Alert line GPIO.\n"..
  2324. "For this bus SMBA is PB12.",
  2325. -- requires = { "NOT_AVAILABLE" },
  2326. flavor = "booldata",
  2327. file = "include/cfg/twi.h"
  2328. }
  2329. }
  2330. },
  2331. --
  2332. -- STM32F I2C V1 Bus 1 Configuration
  2333. --
  2334. {
  2335. name = "nutarch_cm3_stm32_i2c1_v1",
  2336. brief = "STM32 I2C Bus 1 on F1/2/4 and L1",
  2337. description = "STM32F hardware I2C V1 support.",
  2338. requires = { "HW_I2C1_STM32" },
  2339. provides = { "I2CBUS_CONTROLLER" },
  2340. sources =
  2341. {
  2342. "cm3/dev/stm/stm32_i2cbus_v1.c",
  2343. },
  2344. options =
  2345. {
  2346. {
  2347. macro = "I2C1_REMAP",
  2348. brief = "Use Alternate Pins for I2C1",
  2349. description = "Leaving this option unchecked, the driver will initialize the standard Pins.\n\n"..
  2350. "Pin Mapping is:\n SDA PB7\n SCL PB6 \n SMBA PB5"..
  2351. "Pin Mapping remapped is:\n SDA PB9\n SCL PB8\n SMBA PB5",
  2352. requires = { "HW_GPIO_STM32V1" },
  2353. flavor = "booldata",
  2354. file = "include/cfg/uart.h"
  2355. },
  2356. {
  2357. macro = "I2C1_SDA_PIN",
  2358. brief = "I2C1 SDA Pins",
  2359. description = "Choose I2C1 SDA Pin PB7 (Default) or PB9",
  2360. requires = { "HW_GPIO_STM32V2" },
  2361. default = "7",
  2362. type = "enumerated",
  2363. choices = { "7", "9" },
  2364. file = "include/cfg/twi.h"
  2365. },
  2366. {
  2367. macro = "I2C1_SCL_PIN",
  2368. brief = "I2C1 SCL Pins",
  2369. description = "Choose I2C1 SCL Pin PB6 (Default) or PB8",
  2370. requires = { "HW_GPIO_STM32V2" },
  2371. default = "6",
  2372. type = "enumerated",
  2373. choices = { "6", "8" },
  2374. file = "include/cfg/twi.h"
  2375. },
  2376. {
  2377. macro = "I2C1_SMBA_PIN",
  2378. brief = "I2C1 SCL Pins",
  2379. description = "Choose I2C1 SMBA -1 (default) to not use SMBA or Pin PB5",
  2380. default = "-1",
  2381. type = "enumerated",
  2382. choices = { "-1", "5" },
  2383. file = "include/cfg/twi.h"
  2384. }
  2385. }
  2386. },
  2387. --
  2388. -- STM32F I2C Bus 2 Configuration
  2389. --
  2390. {
  2391. name = "nutarch_cm3_stm32_i2c2_v1",
  2392. brief = "STM32 I2C Bus 1 on F3",
  2393. description = "STM32F hardware I2C V1 support.",
  2394. requires = { "HW_I2C2_STM32" },
  2395. provides = { "I2CBUS_CONTROLLER" },
  2396. sources =
  2397. {
  2398. "cm3/dev/stm/stm32_i2cbus_v1.c",
  2399. },
  2400. options =
  2401. {
  2402. {
  2403. macro = "I2C2_SDA_PIN",
  2404. brief = "I2C2 SDA Pins",
  2405. description = "Choose I2C2 SDA Pin PB11(Default) or PF0 or PH5",
  2406. requires = { "HW_GPIO_STM32V2" },
  2407. default = "11",
  2408. type = "enumerated",
  2409. choices = { "15", "0" , "5" },
  2410. file = "include/cfg/twi.h"
  2411. },
  2412. {
  2413. macro = "I2C2_SCL_PIN",
  2414. brief = "I2C2 SCL Pins",
  2415. description = "Choose I2C2 SCL Pin PB10 (Default) or PF1 or PH4",
  2416. requires = { "HW_GPIO_STM32V2" },
  2417. default = "10",
  2418. type = "enumerated",
  2419. choices = { "11", "1", "4" },
  2420. file = "include/cfg/twi.h"
  2421. },
  2422. {
  2423. macro = "I2C2_SMBA_PIN",
  2424. brief = "I2C2 SCL Pins",
  2425. description = "Choose I2C2 SMBA Pin -1 (default) to not use SMBA or PB12 or PF2 or PH6",
  2426. requires = { "HW_GPIO_STM32V2" },
  2427. default = "-1",
  2428. type = "enumerated",
  2429. choices = { "-1", "12" , "2" , "6" },
  2430. file = "include/cfg/twi.h"
  2431. },
  2432. {
  2433. macro = "I2C2_SMBA_F1PIN",
  2434. brief = "I2C2 SMBA Pins on F1",
  2435. description = "F1: Choose I2C2 SMBA Pin -1 (default) to not use SMBA or PB12",
  2436. requires = { "HW_GPIO_STM32V1" },
  2437. default = "-1",
  2438. type = "enumerated",
  2439. choices = { "-1", "11" },
  2440. file = "include/cfg/twi.h"
  2441. }
  2442. }
  2443. },
  2444. --
  2445. -- STM32F I2C Bus 3 Configuration
  2446. --
  2447. {
  2448. name = "nutarch_cm3_stm32_i2c3_v1",
  2449. brief = "STM32 I2C Bus 3",
  2450. description = "STM32F hardware I2C V1 support.",
  2451. requires = { "HW_I2C3_STM32" },
  2452. provides = { "I2CBUS_CONTROLLER" },
  2453. sources =
  2454. {
  2455. "cm3/dev/stm/stm32_i2cbus_v1.c",
  2456. },
  2457. options =
  2458. {
  2459. {
  2460. macro = "I2C3_SDA_PIN",
  2461. brief = "I2C3 SDA Pins",
  2462. description = "Choose I2C3 SDA Pin PC9(Default) or PH8",
  2463. requires = { "HW_GPIO_STM32V2" },
  2464. default = "9",
  2465. type = "enumerated",
  2466. choices = { "9", "8" },
  2467. file = "include/cfg/twi.h"
  2468. },
  2469. {
  2470. macro = "I2C3_SCL_PIN",
  2471. brief = "I2C3 SCL Pins",
  2472. description = "Choose I2C3 SCL Pin PA8 (Default) or PH7",
  2473. requires = { "HW_GPIO_STM32V2" },
  2474. default = "8",
  2475. type = "enumerated",
  2476. choices = { "8", "7" },
  2477. file = "include/cfg/twi.h"
  2478. },
  2479. {
  2480. macro = "I2C3_SMBA_PIN",
  2481. brief = "I2C3 SCL Pins",
  2482. description = "Choose I2C3 SMBA Pin -1 (default) to not use SMBA or PA9 or PH9(809)",
  2483. requires = { "HW_GPIO_STM32V2" },
  2484. default = "-1",
  2485. type = "enumerated",
  2486. choices = { "-1", "9" , "809" },
  2487. file = "include/cfg/twi.h"
  2488. }
  2489. }
  2490. },
  2491. --
  2492. --
  2493. -- STM32F I2C V2 Bus 1 Configuration
  2494. --
  2495. {
  2496. name = "nutarch_cm3_stm32_i2c1_v2",
  2497. brief = "STM32 I2C Bus 1 on F3",
  2498. description = "STM32F hardware I2C V2 support.",
  2499. requires = { "HW_I2C1_STM32V2" },
  2500. provides = { "I2CBUS_CONTROLLER" },
  2501. sources =
  2502. {
  2503. "cm3/dev/stm/stm32_i2cbus_v2.c",
  2504. },
  2505. options =
  2506. {
  2507. {
  2508. macro = "I2C1_SDA_PIN",
  2509. brief = "I2C1 SDA Pins",
  2510. requires = { "HW_GPIO_STM32V2" },
  2511. description = "Choose I2C1 SDA Pin PB7 (Default) or PB9 or PA14",
  2512. default = "7",
  2513. type = "enumerated",
  2514. choices = { "7", "9", "14" },
  2515. file = "include/cfg/twi.h"
  2516. },
  2517. {
  2518. macro = "I2C1_SCL_PIN",
  2519. brief = "I2C1 SCL Pins",
  2520. requires = { "HW_GPIO_STM32V2" },
  2521. description = "Choose I2C1 SCL Pin PB6 (Default) or PB8",
  2522. default = "6",
  2523. type = "enumerated",
  2524. choices = { "6", "8" },
  2525. file = "include/cfg/twi.h"
  2526. },
  2527. {
  2528. macro = "I2C1_SMBA_PIN",
  2529. brief = "I2C1 SCL Pins",
  2530. requires = { "HW_GPIO_STM32V2" },
  2531. description = "Choose I2C1 SMBA -1 (default) to not use SMBA or Pin PB5",
  2532. default = "-1",
  2533. type = "enumerated",
  2534. choices = { "-1", "5" },
  2535. file = "include/cfg/twi.h"
  2536. }
  2537. }
  2538. },
  2539. --
  2540. -- STM32F I2C V2 Bus 2 Configuration
  2541. --
  2542. {
  2543. name = "nutarch_cm3_stm32_i2c2_v2",
  2544. brief = "STM32 I2C Bus 1 on F3",
  2545. description = "STM32F hardware I2C V2 support.",
  2546. requires = { "HW_I2C2_STM32V2" },
  2547. provides = { "I2CBUS_CONTROLLER" },
  2548. sources =
  2549. {
  2550. "cm3/dev/stm/stm32_i2cbus_v2.c",
  2551. },
  2552. options =
  2553. {
  2554. {
  2555. macro = "I2C2_SDA_PIN",
  2556. brief = "I2C2 SDA Pins",
  2557. requires = { "HW_GPIO_STM32V2" },
  2558. description = "Choose I2C2 SDA Pin PA10(Default) or PF0",
  2559. default = "10",
  2560. type = "enumerated",
  2561. choices = { "10", "0" },
  2562. file = "include/cfg/twi.h"
  2563. },
  2564. {
  2565. macro = "I2C2_SCL_PIN",
  2566. brief = "I2C2 SCL Pins",
  2567. requires = { "HW_GPIO_STM32V2" },
  2568. description = "Choose I2C2 SCL Pin PA9 (Default) or PF1 or PF6",
  2569. default = "11",
  2570. type = "enumerated",
  2571. choices = { "11", "1", "6" },
  2572. file = "include/cfg/twi.h"
  2573. },
  2574. {
  2575. macro = "I2C2_SMBA_PIN",
  2576. brief = "I2C2 SCL Pins",
  2577. requires = { "HW_GPIO_STM32V2" },
  2578. description = "Choose I2C2 SMBA Pin -1 (default) to not use SMBA or PA8 or PB12",
  2579. default = "-1",
  2580. type = "enumerated",
  2581. choices = { "-1", "8" , "12"},
  2582. file = "include/cfg/twi.h"
  2583. }
  2584. }
  2585. },
  2586. --
  2587. -- STM32F CAN Configuration
  2588. --
  2589. {
  2590. name = "nutarch_cm3_stm32f_can1",
  2591. brief = "STM32F CAN 1",
  2592. description = "CAN support for STM32F.\n\n"..
  2593. "On some devices this bus shares pins and interrupts with USB bus!\n"..
  2594. "You cannot use them together!",
  2595. requires = { "HW_CAN1_STM32" },
  2596. provides = { "DEV_CANBUS" },
  2597. sources =
  2598. {
  2599. "cm3/dev/stm/stm32_can.c",
  2600. "cm3/dev/stm/stm32_can1.c",
  2601. },
  2602. options =
  2603. {
  2604. {
  2605. macro = "CANBUS1_REMAP_CAN",
  2606. brief = "Use Alternate Pins",
  2607. description = "This CAN bus can be internally connected to several sets of pins.\n\n"..
  2608. "Choice 0: CAN_RX PA11 CAN_TX PA12\n"..
  2609. "Choice 1: CAN_RX PB8 CAN_TX PB9\n"..
  2610. "Choice 2: CAN_RX PD0 CAN_TX PD1\n",
  2611. requires = { "HW_GPIO_STM32V1" },
  2612. default = "0",
  2613. type = "enumerated",
  2614. choices = { "0", "1", "2" },
  2615. file = "include/cfg/can_dev.h"
  2616. },
  2617. {
  2618. macro = "CANBUS1_TX_PIN",
  2619. brief = "CAN1 TX Pin selection",
  2620. description = "Choose CAN1 TX Pin, Default: PA12",
  2621. requires = { "HW_GPIO_STM32V2" },
  2622. type = "enumerated",
  2623. choices = { "12", "9", "1" },
  2624. file = "include/cfg/can_dev.h"
  2625. },
  2626. {
  2627. macro = "CANBUS1_RX_PIN",
  2628. brief = "CAN1 RX Pin selection",
  2629. description = "Choose CAN1 RX Pin, Default: PA11",
  2630. requires = { "HW_GPIO_STM32V2" },
  2631. type = "enumerated",
  2632. choices = { "11", "8", "0" },
  2633. file = "include/cfg/can_dev.h"
  2634. }
  2635. }
  2636. },
  2637. {
  2638. name = "nutarch_cm3_stm32f_can2",
  2639. brief = "STM32F CAN 2",
  2640. description = "CAN Bus 2 support for STM32F.",
  2641. requires = { "HW_CAN2_STM32" },
  2642. provides = { "DEV_CANBUS" },
  2643. sources =
  2644. {
  2645. "cm3/dev/stm/stm32_can.c",
  2646. "cm3/dev/stm/stm32_can2.c",
  2647. },
  2648. options =
  2649. {
  2650. {
  2651. macro = "CANBUS2_REMAP_CAN",
  2652. brief = "Use Alternate Pins",
  2653. description = "This CAN bus can be internally connected to two sets of pins.\n\n"..
  2654. "Choice 0: CAN_RX PB12 CAN_TX PB13\n"..
  2655. "Choice 1: CAN_RX PB5 CAN_TX PB6\n",
  2656. requires = { "HW_GPIO_STM32V1" },
  2657. default = "0",
  2658. type = "enumerated",
  2659. choices = { "0", "1" },
  2660. file = "include/cfg/can_dev.h"
  2661. },
  2662. {
  2663. macro = "CANBUS2_TX_PIN",
  2664. brief = "CAN2 TX Pin selection",
  2665. description = "Choose CAN2 TX Pin, Default: PB13",
  2666. requires = { "HW_GPIO_STM32V2" },
  2667. type = "enumerated",
  2668. choices = { "13", "6" },
  2669. file = "include/cfg/can_dev.h"
  2670. },
  2671. {
  2672. macro = "CANBUS2_RX_PIN",
  2673. brief = "CAN2 RX Pin selection",
  2674. description = "Choose CAN2 RX Pin, Default: PB12",
  2675. requires = { "HW_GPIO_STM32V2" },
  2676. type = "enumerated",
  2677. choices = { "12", "5" },
  2678. file = "include/cfg/can_dev.h"
  2679. }
  2680. }
  2681. },
  2682. --
  2683. -- STM32F CRC Configuration
  2684. --
  2685. {
  2686. name = "nutarch_cm3_stm32f_crc",
  2687. brief = "STM32F CRC32 Generator",
  2688. description = "hardware CRC32 Generator support for STM32F.",
  2689. requires = { "HW_CRC32_STM32" },
  2690. provides = { "DEV_CRC" },
  2691. sources = { "cm3/dev/stm/stm32_crc.c" },
  2692. },
  2693. --
  2694. -- STM32F ADC Configuration
  2695. --
  2696. {
  2697. name = "nutarch_cm3_stm32f_adc",
  2698. brief = "STM32F ADC Channel 1,2",
  2699. description = "ADC channel 1 & 2 support for STM32F.",
  2700. requires = { "HW_ADCF1_12_STM32" },
  2701. provides = { "DEV_ADC" },
  2702. -- sources = { "cm3/dev/stm/stm32f1_adc.c" },
  2703. },
  2704. --
  2705. -- STM32F MMC Interface
  2706. --
  2707. {
  2708. name = "nutarch_cm3_stm32f_sdio",
  2709. brief = "STM32F SD-Card Access",
  2710. description = "Low level SD-Card interface for STM32F.\n\n"..
  2711. "Under development.",
  2712. requires = { "HW_SPI_STM32" },
  2713. provides = { "DEV_MMCLL" },
  2714. -- sources = { "cm3/dev/stm/stm32_sdio.c" },
  2715. },
  2716. --
  2717. -- STM32F SPI1 Interface
  2718. --
  2719. {
  2720. name = "nutarch_cm3_stm32f_spibus1",
  2721. brief = "STM32F SPI1 Bus Controller",
  2722. description = "Supports up to two bus controllers.\n\n"..
  2723. "This early release had been tested on the STM32F103 and STM32F107 only.",
  2724. requires = { "HW_SPI1_STM32" },
  2725. provides = { "SPIBUS_CONTROLLER", "HW_SPI_STM32" },
  2726. sources = { "cm3/dev/stm/stm32_spi1.c" },
  2727. options =
  2728. {
  2729. {
  2730. macro = "SPIBUS1_REMAP_SPI",
  2731. brief = "Use Alternate Pins",
  2732. description = "Leaving this option unchecked, the driver will initialize the standard Pins.\n\n"..
  2733. "Pin Mapping is:\n SPI1_NSS PA4\n SPI1_SCK PA5\n SPI1_MISO PA6\n SPI1_MOSI PA7\n"..
  2734. "Enabling the option alternate port pins are used:\n\n"..
  2735. "Pin Mapping is:\n SPI1_NSS PA15\n SPI1_SCK PB3\n SPI1_MISO PB4\n SPI1_MOSI PB5\n" ..
  2736. "For L1/F2/F4 Pins may also get assigned individually",
  2737. flavor = "booldata",
  2738. file = "include/cfg/spi.h"
  2739. },
  2740. {
  2741. macro = "SPIBUS1_CS0_PORT",
  2742. brief = "SPI1 CS0 Port",
  2743. description = "Choice of SPI1 Node0 CS on GPIO BANK",
  2744. type = "enumerated",
  2745. choices = function() GetGpioBanks() end,
  2746. file = "include/cfg/spi.h"
  2747. },
  2748. {
  2749. macro = "SPIBUS1_CS0_PIN",
  2750. brief = "SPI1 CS0 Pins",
  2751. description = "Choice of SPI1 Node 0 CS on GPIO PIN",
  2752. requires = { "HW_GPIO_STM32V2" },
  2753. type = "enumerated",
  2754. choices = function() GetGpioBits() end,
  2755. file = "include/cfg/spi.h"
  2756. },
  2757. {
  2758. macro = "SPIBUS1_CS1_PORT",
  2759. brief = "SPI1 CS1 Port",
  2760. description = "Choice of SPI1 Node0 CS on GPIO BANK",
  2761. type = "enumerated",
  2762. choices = function() GetGpioBanks() end,
  2763. file = "include/cfg/spi.h"
  2764. },
  2765. {
  2766. macro = "SPIBUS1_CS1_PIN",
  2767. brief = "SPI1 CS1 Pins",
  2768. description = "Choice of SPI1 Node 0 CS on GPIO PIN",
  2769. requires = { "HW_GPIO_STM32V2" },
  2770. type = "enumerated",
  2771. choices = function() GetGpioBits() end,
  2772. file = "include/cfg/spi.h"
  2773. },
  2774. {
  2775. macro = "SPIBUS1_CS2_PORT",
  2776. brief = "SPI1 CS2 Port",
  2777. description = "Choice of SPI1 Node0 CS on GPIO BANK",
  2778. type = "enumerated",
  2779. choices = function() GetGpioBanks() end,
  2780. file = "include/cfg/spi.h"
  2781. },
  2782. {
  2783. macro = "SPIBUS1_CS2_PIN",
  2784. brief = "SPI1 CS2 Pins",
  2785. description = "Choice of SPI1 Node 0 CS on GPIO PIN",
  2786. requires = { "HW_GPIO_STM32V2" },
  2787. type = "enumerated",
  2788. choices = function() GetGpioBits() end,
  2789. file = "include/cfg/spi.h"
  2790. },
  2791. {
  2792. macro = "SPIBUS1_CS3_PORT",
  2793. brief = "SPI1 CS3 Port",
  2794. description = "Choice of SPI1 Node0 CS on GPIO BANK",
  2795. type = "enumerated",
  2796. choices = function() GetGpioBanks() end,
  2797. file = "include/cfg/spi.h"
  2798. },
  2799. {
  2800. macro = "SPIBUS1_CS3_PIN",
  2801. brief = "SPI1 CS3 Pins",
  2802. description = "Choice of SPI1 Node 0 CS on GPIO PIN",
  2803. requires = { "HW_GPIO_STM32V2" },
  2804. type = "enumerated",
  2805. choices = function() GetGpioBits() end,
  2806. file = "include/cfg/spi.h"
  2807. },
  2808. {
  2809. macro = "SPIBUS1_SCK_PIN",
  2810. brief = "SPI1 SCK Pins",
  2811. description = "Choice of SPI1 SCK Pins: PA5(default) and PB3 and on L1 PE13",
  2812. requires = { "HW_GPIO_STM32V2" },
  2813. type = "enumerated",
  2814. choices = function() if c_is_provided("HW_MCU_STM32L1") then return { "5", "3", "13" } else return { "5", "3" } end; end,
  2815. file = "include/cfg/spi.h"
  2816. },
  2817. {
  2818. macro = "SPIBUS1_MISO_PIN",
  2819. brief = "SPI1 MISO Pins",
  2820. description = "Choice of SPI1 MISO Pins: PA6(default) and PB4 and on L1 PE14",
  2821. requires = { "HW_GPIO_STM32V2" },
  2822. type = "enumerated",
  2823. choices = function() if c_is_provided("HW_MCU_STM32L1") then return { "6", "4", "14" } else return { "6", "4" } end; end,
  2824. file = "include/cfg/spi.h"
  2825. },
  2826. {
  2827. macro = "SPIBUS1_MOSI_PIN",
  2828. brief = "SPI1 MOSI Pins",
  2829. description = "Choice of SPI1 MOSI Pins: PA7(default) and PB5 and on L1 PE15",
  2830. requires = { "HW_GPIO_STM32V2" },
  2831. type = "enumerated",
  2832. choices = function() if c_is_provided("HW_MCU_STM32L1") then return { "7", "5", "15" } else return { "7", "7" } end;end,
  2833. file = "include/cfg/spi.h"
  2834. },
  2835. {
  2836. macro = "SPIBUS1_I2S_MODE",
  2837. brief = "I2S Mode (First Controller)",
  2838. description = "If enabled, the controller will transfer I2S data.\n\n"..
  2839. "Under development.",
  2840. -- requires = { "NOT_AVAILABLE" },
  2841. flavor = "boolean",
  2842. file = "include/cfg/spi.h"
  2843. },
  2844. {
  2845. macro = "SPIBUS1_MODE",
  2846. brief = "Select SPIBUS 1 MODE",
  2847. description = "Choices are IRQ(0, default), DMA(1) or polling (2)",
  2848. choices = { "0", "1", "2"},
  2849. default = "0",
  2850. file = "include/cfg/spi.h"
  2851. },
  2852. {
  2853. macro = "SPIBUS1_DMA_TX_ALTERNATE_STREAM",
  2854. brief = "Select SPI1 Alternate TX DMA stream ",
  2855. description = "Select to use stream 5 versus stream 3(default) as SPI1 TX",
  2856. flavor = "boolean",
  2857. file = "include/cfg/spi.h"
  2858. },
  2859. {
  2860. macro = "SPIBUS1_DMA_RX_ALTERNATE_STREAM",
  2861. brief = "Select SPI1 Alternate RX DMA stream ",
  2862. description = "Select to use stream 2 versus stream 0(default) as SPI1 RX",
  2863. flavor = "boolean",
  2864. file = "include/cfg/spi.h"
  2865. },
  2866. },
  2867. },
  2868. --
  2869. -- STM32F SPI2 Interface
  2870. --
  2871. {
  2872. name = "nutarch_cm3_stm32f_spibus2",
  2873. brief = "STM32F SPI2 Bus Controller",
  2874. description = "Supports up to two bus controllers.\n\n"..
  2875. "This early release had been tested on the STM32F103 and STM32F107 only.",
  2876. requires = { "HW_SPI2_STM32" },
  2877. provides = { "SPIBUS_CONTROLLER", "HW_SPI_STM32" },
  2878. sources = { "cm3/dev/stm/stm32_spi2.c" },
  2879. options =
  2880. {
  2881. {
  2882. macro = "SPIBUS2_REMAP_SPI",
  2883. brief = "Use Alternate Pins",
  2884. description = "Leaving this option unchecked, the driver will initialize the standard Pins.\n\n"..
  2885. "Pin Mapping is:\n SPI2_NSS PA4\n SPI2_SCK PA5\n SPI2_MISO PA6\n SPI2_MOSI PA7\n"..
  2886. "Enabling the option alternate port pins are used:\n\n"..
  2887. "Pin Mapping is:\n SPI2_NSS PA15\n SPI2_SCK PB3\n SPI2_MISO PB4\n SPI2_MOSI PB5\n" ..
  2888. "For L1/F2/F4 Pins may also get assigned individually",
  2889. flavor = "booldata",
  2890. file = "include/cfg/spi.h"
  2891. },
  2892. {
  2893. macro = "SPIBUS2_CS0_PORT",
  2894. brief = "SPI2 CS0 Port",
  2895. description = "Choice of SPI2 Node0 CS on GPIO BANK",
  2896. type = "enumerated",
  2897. choices = function() GetGpioBanks() end,
  2898. file = "include/cfg/spi.h"
  2899. },
  2900. {
  2901. macro = "SPIBUS2_CS0_PIN",
  2902. brief = "SPI2 CS0 Pins",
  2903. description = "Choice of SPI2 Node 0 CS on GPIO PIN",
  2904. requires = { "HW_GPIO_STM32V2" },
  2905. type = "enumerated",
  2906. choices = function() GetGpioBits() end,
  2907. file = "include/cfg/spi.h"
  2908. },
  2909. {
  2910. macro = "SPIBUS2_CS1_PORT",
  2911. brief = "SPI2 CS1 Port",
  2912. description = "Choice of SPI2 Node0 CS on GPIO BANK",
  2913. type = "enumerated",
  2914. choices = function() GetGpioBanks() end,
  2915. file = "include/cfg/spi.h"
  2916. },
  2917. {
  2918. macro = "SPIBUS2_CS1_PIN",
  2919. brief = "SPI2 CS1 Pins",
  2920. description = "Choice of SPI2 Node 0 CS on GPIO PIN",
  2921. requires = { "HW_GPIO_STM32V2" },
  2922. type = "enumerated",
  2923. choices = function() GetGpioBits() end,
  2924. file = "include/cfg/spi.h"
  2925. },
  2926. {
  2927. macro = "SPIBUS2_CS2_PORT",
  2928. brief = "SPI2 CS2 Port",
  2929. description = "Choice of SPI2 Node0 CS on GPIO BANK",
  2930. type = "enumerated",
  2931. choices = function() GetGpioBanks() end,
  2932. file = "include/cfg/spi.h"
  2933. },
  2934. {
  2935. macro = "SPIBUS2_CS2_PIN",
  2936. brief = "SPI2 CS2 Pins",
  2937. description = "Choice of SPI2 Node 0 CS on GPIO PIN",
  2938. requires = { "HW_GPIO_STM32V2" },
  2939. type = "enumerated",
  2940. choices = function() GetGpioBits() end,
  2941. file = "include/cfg/spi.h"
  2942. },
  2943. {
  2944. macro = "SPIBUS2_CS3_PORT",
  2945. brief = "SPI2 CS3 Port",
  2946. description = "Choice of SPI2 Node0 CS on GPIO BANK",
  2947. type = "enumerated",
  2948. choices = function() GetGpioBanks() end,
  2949. file = "include/cfg/spi.h"
  2950. },
  2951. {
  2952. macro = "SPIBUS2_CS3_PIN",
  2953. brief = "SPI2 CS3 Pins",
  2954. description = "Choice of SPI2 Node 0 CS on GPIO PIN",
  2955. requires = { "HW_GPIO_STM32V2" },
  2956. type = "enumerated",
  2957. choices = function() GetGpioBits() end,
  2958. file = "include/cfg/spi.h"
  2959. },
  2960. {
  2961. macro = "SPIBUS2_SCK_PIN",
  2962. brief = "SPI2 SCK Pins",
  2963. description = "Choice of SPI2 SCK Pins: PB13(default) and on F2/F4 PB10 and PI1 and on L1 PD1",
  2964. requires = { "HW_GPIO_STM32V2" },
  2965. type = "enumerated",
  2966. choices = function() if c_is_provided("HW_MCU_STM32L1") then return { "13", "1" } else return { "13", "1", "901" } end; end,
  2967. file = "include/cfg/spi.h"
  2968. },
  2969. {
  2970. macro = "SPIBUS2_MISO_PIN",
  2971. brief = "SPI2 MISO Pins",
  2972. description = "Choice of SPI2 MISO Pins: PB14(default) and on F2/F4 PC2 and PI2 and on L1 PD2",
  2973. requires = { "HW_GPIO_STM32V2" },
  2974. type = "enumerated",
  2975. choices = function() if c_is_provided("HW_MCU_STM32L1") then return { "14", "2" } else return { "14", "2", "902" } end; end,
  2976. file = "include/cfg/spi.h"
  2977. },
  2978. {
  2979. macro = "SPIBUS2_MOSI_PIN",
  2980. brief = "SPI2 MOSI Pins",
  2981. description = "Choice of SPI2 MOSI Pins: PB15(default) and on F2/F4 PC3 and PI3 and on L1 PD3",
  2982. requires = { "HW_GPIO_STM32V2" },
  2983. type = "enumerated",
  2984. choices = function() if c_is_provided("HW_MCU_STM32L1") then return { "15", "3" } else return { "15", "3", "903" } end; end,
  2985. file = "include/cfg/spi.h"
  2986. },
  2987. {
  2988. macro = "SPIBUS2_I2S_MODE",
  2989. brief = "I2S Mode (Second Controller)",
  2990. description = "If enabled, the controller will transfer I2S data.\n\n"..
  2991. "Under development.",
  2992. -- requires = { "NOT_AVAILABLE" },
  2993. flavor = "boolean",
  2994. file = "include/cfg/spi.h"
  2995. },
  2996. {
  2997. macro = "SPIBUS2_MODE",
  2998. brief = "Select SPIBUS 2 MODE",
  2999. description = "Choices are IRQ(0, default), DMA(1) or polling (2)",
  3000. choices = { "0", "1", "2"},
  3001. default = "0",
  3002. file = "include/cfg/spi.h"
  3003. },
  3004. }
  3005. },
  3006. --
  3007. -- STM32F SPI3 Interface
  3008. --
  3009. {
  3010. name = "nutarch_cm3_stm32f_spibus3",
  3011. brief = "STM32F SPI3 Bus Controller",
  3012. description = "Supports up to two bus controllers.\n\n"..
  3013. "This early release had been tested on the STM32F103 and STM32F107 only.",
  3014. requires = { "HW_SPI3_STM32" },
  3015. provides = { "SPIBUS_CONTROLLER", "HW_SPI_STM32" },
  3016. sources = { "cm3/dev/stm/stm32_spi3.c" },
  3017. options =
  3018. {
  3019. {
  3020. macro = "SPIBUS3_REMAP_SPI",
  3021. brief = "Use Alternate Pins",
  3022. description = "Leaving this option unchecked, the driver will initialize the standard Pins.\n\n"..
  3023. "Pin Mapping is:\n SPI3_NSS PA4\n SPI3_SCK PA5\n SPI3_MISO PA6\n SPI3_MOSI PA7\n"..
  3024. "Enabling the option alternate port pins are used:\n\n"..
  3025. "Pin Mapping is:\n SPI3_NSS PA15\n SPI3_SCK PB3\n SPI3_MISO PB4\n SPI3_MOSI PB5\n" ..
  3026. "For L1/F2/F4 Pins may also get assigned individually",
  3027. flavor = "booldata",
  3028. file = "include/cfg/spi.h"
  3029. },
  3030. {
  3031. macro = "SPIBUS3_CS0_PORT",
  3032. brief = "SPI3 CS0 Port",
  3033. description = "Choice of SPI3 Node0 CS on GPIO BANK",
  3034. type = "enumerated",
  3035. choices = function() GetGpioBanks() end,
  3036. file = "include/cfg/spi.h"
  3037. },
  3038. {
  3039. macro = "SPIBUS3_CS0_PIN",
  3040. brief = "SPI3 CS0 Pins",
  3041. description = "Choice of SPI3 Node 0 CS on GPIO PIN",
  3042. requires = { "HW_GPIO_STM32V2" },
  3043. type = "enumerated",
  3044. choices = function() GetGpioBits() end,
  3045. file = "include/cfg/spi.h"
  3046. },
  3047. {
  3048. macro = "SPIBUS3_CS1_PORT",
  3049. brief = "SPI3 CS1 Port",
  3050. description = "Choice of SPI3 Node0 CS on GPIO BANK",
  3051. type = "enumerated",
  3052. choices = function() GetGpioBanks() end,
  3053. file = "include/cfg/spi.h"
  3054. },
  3055. {
  3056. macro = "SPIBUS3_CS1_PIN",
  3057. brief = "SPI3 CS1 Pins",
  3058. description = "Choice of SPI3 Node 0 CS on GPIO PIN",
  3059. requires = { "HW_GPIO_STM32V2" },
  3060. type = "enumerated",
  3061. choices = function() GetGpioBits() end,
  3062. file = "include/cfg/spi.h"
  3063. },
  3064. {
  3065. macro = "SPIBUS3_CS2_PORT",
  3066. brief = "SPI3 CS2 Port",
  3067. description = "Choice of SPI3 Node0 CS on GPIO BANK",
  3068. type = "enumerated",
  3069. choices = function() GetGpioBanks() end,
  3070. file = "include/cfg/spi.h"
  3071. },
  3072. {
  3073. macro = "SPIBUS3_CS2_PIN",
  3074. brief = "SPI3 CS2 Pins",
  3075. description = "Choice of SPI3 Node 0 CS on GPIO PIN",
  3076. requires = { "HW_GPIO_STM32V2" },
  3077. type = "enumerated",
  3078. choices = function() GetGpioBits() end,
  3079. file = "include/cfg/spi.h"
  3080. },
  3081. {
  3082. macro = "SPIBUS3_CS3_PORT",
  3083. brief = "SPI3 CS3 Port",
  3084. description = "Choice of SPI3 Node0 CS on GPIO BANK",
  3085. type = "enumerated",
  3086. choices = function() GetGpioBanks() end,
  3087. file = "include/cfg/spi.h"
  3088. },
  3089. {
  3090. macro = "SPIBUS3_CS3_PIN",
  3091. brief = "SPI3 CS3 Pins",
  3092. description = "Choice of SPI3 Node 0 CS on GPIO PIN",
  3093. requires = { "HW_GPIO_STM32V2" },
  3094. type = "enumerated",
  3095. choices = function() GetGpioBits() end,
  3096. file = "include/cfg/spi.h"
  3097. },
  3098. {
  3099. macro = "SPIBUS3_SCK_PIN",
  3100. brief = "SPI3 SCK Pins",
  3101. description = "Choice of SPI3 SCK Pins: PB3(default) and PC10",
  3102. requires = { "HW_GPIO_STM32V2" },
  3103. type = "enumerated",
  3104. choices = { "3", "10" },
  3105. file = "include/cfg/spi.h"
  3106. },
  3107. {
  3108. macro = "SPIBUS3_MISO_PIN",
  3109. brief = "SPI3 MISO Pins",
  3110. description = "Choice of SPI3 MISO Pins: PB4(default) and PC11",
  3111. requires = { "HW_GPIO_STM32V2" },
  3112. type = "enumerated",
  3113. choices = { "4", "11" },
  3114. file = "include/cfg/spi.h"
  3115. },
  3116. {
  3117. macro = "SPIBUS3_MOSI_PIN",
  3118. brief = "SPI3 MOSI Pins",
  3119. description = "Choice of SPI3 MOSI Pins: PB5(default) PC12",
  3120. requires = { "HW_GPIO_STM32V2" },
  3121. type = "enumerated",
  3122. choices = { "5", "12" },
  3123. file = "include/cfg/spi.h"
  3124. },
  3125. {
  3126. macro = "SPIBUS3_CS_PORT",
  3127. brief = "SPI3 CS Port",
  3128. description = "Choice of SPI3 CS Pins on GPIO BANK",
  3129. requires = { "HW_GPIO_STM32V2" },
  3130. type = "enumerated",
  3131. choices = function() GetGpioBanks() end,
  3132. file = "include/cfg/spi.h"
  3133. },
  3134. {
  3135. macro = "SPIBUS3_CS_PIN",
  3136. brief = "SPI3 CS Pins",
  3137. description = "Choice of SPI3 CS Pins on GPIO PIN",
  3138. requires = { "HW_GPIO_STM32V2" },
  3139. type = "enumerated",
  3140. choices = function() GetGpioBits() end,
  3141. file = "include/cfg/spi.h"
  3142. },
  3143. {
  3144. macro = "SPIBUS3_I2S_MODE",
  3145. brief = "I2S Mode (Third Controller)",
  3146. description = "If enabled, the controller will transfer I2S data.\n\n"..
  3147. "Under development.",
  3148. -- requires = { "NOT_AVAILABLE" },
  3149. flavor = "boolean",
  3150. file = "include/cfg/spi.h"
  3151. },
  3152. {
  3153. macro = "SPIBUS3_MODE",
  3154. brief = "Select SPIBUS 3 MODE",
  3155. description = "Choices are IRQ(0, default), DMA(1) or polling (2)",
  3156. choices = { "0", "1", "2"},
  3157. default = "0",
  3158. file = "include/cfg/spi.h"
  3159. },
  3160. {
  3161. macro = "SPIBUS3_DMA_TX_ALTERNATE_STREAM",
  3162. brief = "Select SPI3 Alternate TX DMA stream ",
  3163. description = "Select to use stream 7 versus stream 5(default) as SPI3 TX",
  3164. flavor = "boolean",
  3165. file = "include/cfg/spi.h"
  3166. },
  3167. {
  3168. macro = "SPIBUS3_DMA_RX_ALTERNATE_STREAM",
  3169. brief = "Select SPI3 Alternate RX DMA stream ",
  3170. description = "Select to use stream 2 versus stream 0(default) as SPI3 RX",
  3171. flavor = "boolean",
  3172. file = "include/cfg/spi.h"
  3173. },
  3174. },
  3175. },
  3176. --
  3177. -- STM32F SPI4 Interface
  3178. --
  3179. {
  3180. name = "nutarch_cm3_stm32f_spibus4",
  3181. brief = "STM32F SPI4 Bus Controller",
  3182. description = "STM32F SPI4 Bus Controller",
  3183. requires = { "HW_SPI4_STM32" },
  3184. provides = { "SPIBUS_CONTROLLER", "HW_SPI_STM32" },
  3185. sources = { "cm3/dev/stm/stm32_spi4.c" },
  3186. options =
  3187. {
  3188. -- Not available on F1, so no global remap
  3189. {
  3190. macro = "SPIBUS4_CS0_PORT",
  3191. brief = "SPI4 CS0 Port",
  3192. description = "Choice of SPI4 Node0 CS on GPIO BANK",
  3193. type = "enumerated",
  3194. choices = function() GetGpioBanks() end,
  3195. file = "include/cfg/spi.h"
  3196. },
  3197. {
  3198. macro = "SPIBUS4_CS0_PIN",
  3199. brief = "SPI4 CS0 Pins",
  3200. description = "Choice of SPI4 Node 0 CS on GPIO PIN",
  3201. requires = { "HW_GPIO_STM32V2" },
  3202. type = "enumerated",
  3203. choices = function() GetGpioBits() end,
  3204. file = "include/cfg/spi.h"
  3205. },
  3206. {
  3207. macro = "SPIBUS4_CS1_PORT",
  3208. brief = "SPI4 CS1 Port",
  3209. description = "Choice of SPI4 Node0 CS on GPIO BANK",
  3210. type = "enumerated",
  3211. choices = function() GetGpioBanks() end,
  3212. file = "include/cfg/spi.h"
  3213. },
  3214. {
  3215. macro = "SPIBUS4_CS1_PIN",
  3216. brief = "SPI4 CS1 Pins",
  3217. description = "Choice of SPI4 Node 0 CS on GPIO PIN",
  3218. requires = { "HW_GPIO_STM32V2" },
  3219. type = "enumerated",
  3220. choices = function() GetGpioBits() end,
  3221. file = "include/cfg/spi.h"
  3222. },
  3223. {
  3224. macro = "SPIBUS4_CS2_PORT",
  3225. brief = "SPI4 CS2 Port",
  3226. description = "Choice of SPI4 Node0 CS on GPIO BANK",
  3227. type = "enumerated",
  3228. choices = function() GetGpioBanks() end,
  3229. file = "include/cfg/spi.h"
  3230. },
  3231. {
  3232. macro = "SPIBUS4_CS2_PIN",
  3233. brief = "SPI4 CS2 Pins",
  3234. description = "Choice of SPI4 Node 0 CS on GPIO PIN",
  3235. requires = { "HW_GPIO_STM32V2" },
  3236. type = "enumerated",
  3237. choices = function() GetGpioBits() end,
  3238. file = "include/cfg/spi.h"
  3239. },
  3240. {
  3241. macro = "SPIBUS4_CS3_PORT",
  3242. brief = "SPI4 CS3 Port",
  3243. description = "Choice of SPI4 Node0 CS on GPIO BANK",
  3244. type = "enumerated",
  3245. choices = function() GetGpioBanks() end,
  3246. file = "include/cfg/spi.h"
  3247. },
  3248. {
  3249. macro = "SPIBUS4_CS3_PIN",
  3250. brief = "SPI4 CS3 Pins",
  3251. description = "Choice of SPI4 Node 0 CS on GPIO PIN",
  3252. requires = { "HW_GPIO_STM32V2" },
  3253. type = "enumerated",
  3254. choices = function() GetGpioBits() end,
  3255. file = "include/cfg/spi.h"
  3256. },
  3257. {
  3258. macro = "SPIBUS4_SCK_PIN",
  3259. brief = "SPI4 SCK Pins",
  3260. description = "Choice of SPI4 SCK Pins: PE2(default) and PE11",
  3261. requires = { "HW_GPIO_STM32V2" },
  3262. type = "enumerated",
  3263. choices = { "2", "11" },
  3264. file = "include/cfg/spi.h"
  3265. },
  3266. {
  3267. macro = "SPIBUS4_MISO_PIN",
  3268. brief = "SPI4 MISO Pins",
  3269. description = "Choice of SPI4 MISO Pins: PE5(default) and PE13",
  3270. requires = { "HW_GPIO_STM32V2" },
  3271. type = "enumerated",
  3272. choices = { "5", "13" },
  3273. file = "include/cfg/spi.h"
  3274. },
  3275. {
  3276. macro = "SPIBUS4_MOSI_PIN",
  3277. brief = "SPI4 MOSI Pins",
  3278. description = "Choice of SPI4 MOSI Pins: PE6(default) and PE14",
  3279. requires = { "HW_GPIO_STM32V2" },
  3280. type = "enumerated",
  3281. choices = { "6", "14" },
  3282. file = "include/cfg/spi.h"
  3283. },
  3284. {
  3285. macro = "SPIBUS4_CS_PORT",
  3286. brief = "SPI4 CS Port",
  3287. description = "Choice of SPI4 CS Pins on GPIO BANK",
  3288. requires = { "HW_GPIO_STM32V2" },
  3289. type = "enumerated",
  3290. choices = function() GetGpioBanks() end,
  3291. file = "include/cfg/spi.h"
  3292. },
  3293. {
  3294. macro = "SPIBUS4_CS_PIN",
  3295. brief = "SPI4 CS Pins",
  3296. description = "Choice of SPI4 CS Pins on GPIO PIN",
  3297. requires = { "HW_GPIO_STM32V2" },
  3298. type = "enumerated",
  3299. choices = function() GetGpioBits() end,
  3300. file = "include/cfg/spi.h"
  3301. },
  3302. {
  3303. macro = "SPIBUS4_I2S_MODE",
  3304. brief = "I2S Mode (Third Controller)",
  3305. description = "If enabled, the controller will transfer I2S data.\n\n"..
  3306. "Under development.",
  3307. -- requires = { "NOT_AVAILABLE" },
  3308. flavor = "boolean",
  3309. file = "include/cfg/spi.h"
  3310. },
  3311. {
  3312. macro = "SPIBUS4_MODE",
  3313. brief = "Select SPIBUS 4 MODE",
  3314. description = "Choices are IRQ(0, default), DMA(1) or polling (2)",
  3315. choices = { "0", "1", "2"},
  3316. default = "0",
  3317. file = "include/cfg/spi.h"
  3318. },
  3319. {
  3320. macro = "SPIBUS4_DMA_TX_ALTERNATE_STREAM",
  3321. brief = "Select SPI4 Alternate TX DMA stream ",
  3322. description = "Select to use stream 4 versus stream 1(default) as SPI4 TX",
  3323. flavor = "boolean",
  3324. file = "include/cfg/spi.h"
  3325. },
  3326. {
  3327. macro = "SPIBUS4_DMA_RX_ALTERNATE_STREAM",
  3328. brief = "Select SPI4 Alternate RX DMA stream ",
  3329. description = "Select to use stream 3 versus stream 0(default) as SPI4 TX",
  3330. flavor = "boolean",
  3331. file = "include/cfg/spi.h"
  3332. },
  3333. },
  3334. },
  3335. --
  3336. -- STM32F SPI5 Interface
  3337. --
  3338. {
  3339. name = "nutarch_cm3_stm32f_spibus5",
  3340. brief = "STM32F SPI5 Bus Controller",
  3341. description = "STM32F SPI5 Bus Controller",
  3342. requires = { "HW_SPI5_STM32" },
  3343. provides = { "SPIBUS_CONTROLLER", "HW_SPI_STM32" },
  3344. sources = { "cm3/dev/stm/stm32_spi5.c" },
  3345. options =
  3346. {
  3347. -- Not available on F1, so no global remap
  3348. {
  3349. macro = "SPIBUS5_CS0_PORT",
  3350. brief = "SPI5 CS0 Port",
  3351. description = "Choice of SPI5 Node0 CS on GPIO BANK",
  3352. type = "enumerated",
  3353. choices = function() GetGpioBanks() end,
  3354. file = "include/cfg/spi.h"
  3355. },
  3356. {
  3357. macro = "SPIBUS5_CS0_PIN",
  3358. brief = "SPI5 CS0 Pins",
  3359. description = "Choice of SPI5 Node 0 CS on GPIO PIN",
  3360. requires = { "HW_GPIO_STM32V2" },
  3361. type = "enumerated",
  3362. choices = function() GetGpioBits() end,
  3363. file = "include/cfg/spi.h"
  3364. },
  3365. {
  3366. macro = "SPIBUS5_CS1_PORT",
  3367. brief = "SPI5 CS1 Port",
  3368. description = "Choice of SPI5 Node0 CS on GPIO BANK",
  3369. type = "enumerated",
  3370. choices = function() GetGpioBanks() end,
  3371. file = "include/cfg/spi.h"
  3372. },
  3373. {
  3374. macro = "SPIBUS5_CS1_PIN",
  3375. brief = "SPI5 CS1 Pins",
  3376. description = "Choice of SPI5 Node 0 CS on GPIO PIN",
  3377. requires = { "HW_GPIO_STM32V2" },
  3378. type = "enumerated",
  3379. choices = function() GetGpioBits() end,
  3380. file = "include/cfg/spi.h"
  3381. },
  3382. {
  3383. macro = "SPIBUS5_CS2_PORT",
  3384. brief = "SPI5 CS2 Port",
  3385. description = "Choice of SPI5 Node0 CS on GPIO BANK",
  3386. type = "enumerated",
  3387. choices = function() GetGpioBanks() end,
  3388. file = "include/cfg/spi.h"
  3389. },
  3390. {
  3391. macro = "SPIBUS5_CS2_PIN",
  3392. brief = "SPI5 CS2 Pins",
  3393. description = "Choice of SPI5 Node 0 CS on GPIO PIN",
  3394. requires = { "HW_GPIO_STM32V2" },
  3395. type = "enumerated",
  3396. choices = function() GetGpioBits() end,
  3397. file = "include/cfg/spi.h"
  3398. },
  3399. {
  3400. macro = "SPIBUS5_CS3_PORT",
  3401. brief = "SPI5 CS3 Port",
  3402. description = "Choice of SPI5 Node0 CS on GPIO BANK",
  3403. type = "enumerated",
  3404. choices = function() GetGpioBanks() end,
  3405. file = "include/cfg/spi.h"
  3406. },
  3407. {
  3408. macro = "SPIBUS5_CS3_PIN",
  3409. brief = "SPI5 CS3 Pins",
  3410. description = "Choice of SPI5 Node 0 CS on GPIO PIN",
  3411. requires = { "HW_GPIO_STM32V2" },
  3412. type = "enumerated",
  3413. choices = function() GetGpioBits() end,
  3414. file = "include/cfg/spi.h"
  3415. },
  3416. {
  3417. macro = "SPIBUS5_SCK_PIN",
  3418. brief = "SPI5 SCK Pins",
  3419. description = "Choice of SPI5 SCK Pins: PF7(default) and PH6",
  3420. requires = { "HW_GPIO_STM32V2" },
  3421. type = "enumerated",
  3422. choices = { "7", "6" },
  3423. file = "include/cfg/spi.h"
  3424. },
  3425. {
  3426. macro = "SPIBUS5_MISO_PIN",
  3427. brief = "SPI5 MISO Pins",
  3428. description = "Choice of SPI5 MISO Pins: PF8(default) and PH7",
  3429. requires = { "HW_GPIO_STM32V2" },
  3430. type = "enumerated",
  3431. choices = { "8", "7" },
  3432. file = "include/cfg/spi.h"
  3433. },
  3434. {
  3435. macro = "SPIBUS5_MOSI_PIN",
  3436. brief = "SPI5 MOSI Pins",
  3437. description = "Choice of SPI5 MOSI Pins: PF9(default) and PF11",
  3438. requires = { "HW_GPIO_STM32V2" },
  3439. type = "enumerated",
  3440. choices = { "9", "11" },
  3441. file = "include/cfg/spi.h"
  3442. },
  3443. {
  3444. macro = "SPIBUS5_CS_PORT",
  3445. brief = "SPI5 CS Port",
  3446. description = "Choice of SPI5 CS Pins on GPIO BANK",
  3447. requires = { "HW_GPIO_STM32V2" },
  3448. type = "enumerated",
  3449. choices = function() GetGpioBanks() end,
  3450. file = "include/cfg/spi.h"
  3451. },
  3452. {
  3453. macro = "SPIBUS5_CS_PIN",
  3454. brief = "SPI5 CS Pins",
  3455. description = "Choice of SPI5 CS Pins on GPIO PIN",
  3456. requires = { "HW_GPIO_STM32V2" },
  3457. type = "enumerated",
  3458. choices = function() GetGpioBits() end,
  3459. file = "include/cfg/spi.h"
  3460. },
  3461. {
  3462. macro = "SPIBUS5_I2S_MODE",
  3463. brief = "I2S Mode (Third Controller)",
  3464. description = "If enabled, the controller will transfer I2S data.\n\n"..
  3465. "Under development.",
  3466. -- requires = { "NOT_AVAILABLE" },
  3467. flavor = "boolean",
  3468. file = "include/cfg/spi.h"
  3469. },
  3470. {
  3471. macro = "SPIBUS5_MODE",
  3472. brief = "Select SPIBUS 5 MODE",
  3473. description = "Choices are IRQ(0, default), DMA(1) or polling (2)",
  3474. choices = { "0", "1", "2"},
  3475. default = "0",
  3476. file = "include/cfg/spi.h"
  3477. },
  3478. {
  3479. macro = "SPIBUS5_DMA_TX_ALTERNATE_STREAM",
  3480. brief = "Select SPI5 Alternate TX DMA stream ",
  3481. description = "Select to use stream 6 versus stream 4(default) as SPI5 TX",
  3482. flavor = "boolean",
  3483. file = "include/cfg/spi.h"
  3484. },
  3485. {
  3486. macro = "SPIBUS5_DMA_RX_ALTERNATE_STREAM",
  3487. brief = "Select SPI5 Alternate RX DMA stream ",
  3488. description = "Select to use stream 5 versus stream 2(default) as SPI5 RX",
  3489. flavor = "boolean",
  3490. file = "include/cfg/spi.h"
  3491. },
  3492. },
  3493. },
  3494. --
  3495. -- STM32F SPI6 Interface
  3496. --
  3497. {
  3498. name = "nutarch_cm3_stm32f_spibus6",
  3499. brief = "STM32F SPI6 Bus Controller",
  3500. description = "STM32F SPI6 Bus Controller",
  3501. requires = { "HW_SPI6_STM32" },
  3502. provides = { "SPIBUS_CONTROLLER", "HW_SPI_STM32" },
  3503. sources = { "cm3/dev/stm/stm32_spi6.c" },
  3504. options =
  3505. {
  3506. -- Not available on F1, so no global remap
  3507. {
  3508. macro = "SPIBUS6_CS0_PORT",
  3509. brief = "SPI6 CS0 Port",
  3510. description = "Choice of SPI6 Node0 CS on GPIO BANK",
  3511. type = "enumerated",
  3512. choices = function() GetGpioBanks() end,
  3513. file = "include/cfg/spi.h"
  3514. },
  3515. {
  3516. macro = "SPIBUS6_CS0_PIN",
  3517. brief = "SPI6 CS0 Pins",
  3518. description = "Choice of SPI6 Node 0 CS on GPIO PIN",
  3519. requires = { "HW_GPIO_STM32V2" },
  3520. type = "enumerated",
  3521. choices = function() GetGpioBits() end,
  3522. file = "include/cfg/spi.h"
  3523. },
  3524. {
  3525. macro = "SPIBUS6_CS1_PORT",
  3526. brief = "SPI6 CS1 Port",
  3527. description = "Choice of SPI6 Node0 CS on GPIO BANK",
  3528. type = "enumerated",
  3529. choices = function() GetGpioBanks() end,
  3530. file = "include/cfg/spi.h"
  3531. },
  3532. {
  3533. macro = "SPIBUS6_CS1_PIN",
  3534. brief = "SPI6 CS1 Pins",
  3535. description = "Choice of SPI6 Node 0 CS on GPIO PIN",
  3536. requires = { "HW_GPIO_STM32V2" },
  3537. type = "enumerated",
  3538. choices = function() GetGpioBits() end,
  3539. file = "include/cfg/spi.h"
  3540. },
  3541. {
  3542. macro = "SPIBUS6_CS2_PORT",
  3543. brief = "SPI6 CS2 Port",
  3544. description = "Choice of SPI6 Node0 CS on GPIO BANK",
  3545. type = "enumerated",
  3546. choices = function() GetGpioBanks() end,
  3547. file = "include/cfg/spi.h"
  3548. },
  3549. {
  3550. macro = "SPIBUS6_CS2_PIN",
  3551. brief = "SPI6 CS2 Pins",
  3552. description = "Choice of SPI6 Node 0 CS on GPIO PIN",
  3553. requires = { "HW_GPIO_STM32V2" },
  3554. type = "enumerated",
  3555. choices = function() GetGpioBits() end,
  3556. file = "include/cfg/spi.h"
  3557. },
  3558. {
  3559. macro = "SPIBUS6_CS3_PORT",
  3560. brief = "SPI6 CS3 Port",
  3561. description = "Choice of SPI6 Node0 CS on GPIO BANK",
  3562. type = "enumerated",
  3563. choices = function() GetGpioBanks() end,
  3564. file = "include/cfg/spi.h"
  3565. },
  3566. {
  3567. macro = "SPIBUS6_CS3_PIN",
  3568. brief = "SPI6 CS3 Pins",
  3569. description = "Choice of SPI6 Node 0 CS on GPIO PIN",
  3570. requires = { "HW_GPIO_STM32V2" },
  3571. type = "enumerated",
  3572. choices = function() GetGpioBits() end,
  3573. file = "include/cfg/spi.h"
  3574. },
  3575. {
  3576. macro = "SPIBUS6_I2S_MODE",
  3577. brief = "I2S Mode (Third Controller)",
  3578. description = "If enabled, the controller will transfer I2S data.\n\n"..
  3579. "Under development.",
  3580. -- requires = { "NOT_AVAILABLE" },
  3581. flavor = "boolean",
  3582. file = "include/cfg/spi.h"
  3583. },
  3584. {
  3585. macro = "SPIBUS6_MODE",
  3586. brief = "Select SPIBUS 6 MODE",
  3587. description = "Choices are IRQ(0, default), DMA(1) or polling (2)",
  3588. choices = { "0", "1", "2"},
  3589. default = "0",
  3590. file = "include/cfg/spi.h"
  3591. },
  3592. },
  3593. },
  3594. --
  3595. -- STM32F LCD Interface Drivers
  3596. --
  3597. {
  3598. name = "nutarch_cm3_stm32f_chlcd",
  3599. brief = "Character LCD Driver (STM32F)",
  3600. description = "Parallel or serial connected displays like\n"..
  3601. "HD44780, KS0066, KS0073 and others.\n",
  3602. requires = { "HW_MCU_STM32" },
  3603. provides = { "DEV_FILE", "DEV_WRITE" },
  3604. -- sources = { "arm/dev/stm32_charlcd.c" },
  3605. options =
  3606. {
  3607. --
  3608. -- Define selection of supported driver chips
  3609. --
  3610. {
  3611. macro = "LCD_HD44780",
  3612. brief = "HD44780 Driver",
  3613. description = "Tested on the EIR 1.0 with 2x16 and 4x20 character LCD.",
  3614. exclusivity = { "LCD_HD44780", "LCD_KS0066", "LCD_KS0073", "LCD_ST7036" },
  3615. flavor = "booldata",
  3616. provides = { "LCD_GPIO" },
  3617. file = "include/cfg/lcd.h",
  3618. },
  3619. {
  3620. macro = "LCD_KS0066",
  3621. brief = "KS0066 Driver",
  3622. description = "Currently not tested.",
  3623. exclusivity = { "LCD_HD44780", "LCD_KS0066", "LCD_KS0073", "LCD_ST7036" },
  3624. flavor = "booldata",
  3625. provides = { "LCD_GPIO" },
  3626. file = "include/cfg/lcd.h",
  3627. },
  3628. {
  3629. macro = "LCD_KS0073",
  3630. brief = "KS0073 Driver",
  3631. description = "Currently not tested.",
  3632. exclusivity = { "LCD_HD44780", "LCD_KS0066", "LCD_KS0073", "LCD_ST7036" },
  3633. flavor = "booldata",
  3634. provides = { "LCD_GPIO" },
  3635. file = "include/cfg/lcd.h",
  3636. },
  3637. {
  3638. macro = "LCD_ST7036",
  3639. brief = "ST7036 Driver",
  3640. description = "Serial connected display via SPI.\nCurrently not tested.",
  3641. exclusivity = { "LCD_HD44780", "LCD_KS0066", "LCD_KS0073", "LCD_ST7036" },
  3642. flavor = "booldata",
  3643. provides = { "LCD_SPI" },
  3644. file = "include/cfg/lcd.h",
  3645. },
  3646. --
  3647. -- Support for timing related parameters
  3648. --
  3649. {
  3650. macro = "LCD_ROWS",
  3651. brief = "Rows",
  3652. description = "The number of available display rows, either 1, 2 or 4.",
  3653. default = "2",
  3654. flavor = "integer",
  3655. file = "include/cfg/lcd.h"
  3656. },
  3657. {
  3658. macro = "LCD_COLS",
  3659. brief = "Columns",
  3660. description = "The number of available display colums, either 8, 16, 20 or 40.",
  3661. default = "16",
  3662. flavor = "integer",
  3663. file = "include/cfg/lcd.h"
  3664. },
  3665. {
  3666. macro = "LCD_PW_EH",
  3667. brief = "Enable Pulse Stretch",
  3668. description = "Set a value here if the system is to fast to guarantee a minimum enable high time:\n"..
  3669. "For HD44780 with Vcc=5.0V this is 230ns\n"..
  3670. "For HD44780 with Vcc=3.3V this is 500ns\n\n"..
  3671. "This value uses a NOP-Loop to stretch the enable Pulse and is directly dependand on the "..
  3672. "systems CPU speed. It also may differ for other chips.\n\n"..
  3673. "For a 5V driven display connected to EIR 1.0, this value can be left empty while it must "..
  3674. "be set to about 5 for a 3.3V driven HD44780 LCD.",
  3675. requires = { "LCD_GPIO" },
  3676. flavor = "integer",
  3677. file = "include/cfg/lcd.h"
  3678. },
  3679. {
  3680. macro = "LCD_E2E_DLY",
  3681. brief = "Enable to Enable Delay",
  3682. description = "Time for Enable to Enable delay in µs. This is the timespan between two\n"..
  3683. "consecutive accesses of the 4-bit or 8-bit bus.\n For SPI-bus driven chips, this "..
  3684. "is the /CS to /CS delay. This function uses NutMicroDelay()",
  3685. default = "80",
  3686. flavor = "integer",
  3687. file = "include/cfg/lcd.h"
  3688. },
  3689. {
  3690. macro = "LCD_SLEEP_DLY",
  3691. brief = "Sleep after Data",
  3692. description = "Enable this option on a timing critical system.\n"..
  3693. "Instead of cosecutive accessing the display this option will enable a NutSleep(1)\n"..
  3694. "After each data or command written out to the LCD.",
  3695. flavor = "boolean",
  3696. file = "include/cfg/lcd.h"
  3697. },
  3698. --
  3699. -- Selection of parallel interface parameters
  3700. --
  3701. {
  3702. macro = "LCD_IF_8BIT",
  3703. brief = "8-Bit Mode",
  3704. description = "Select parallel bus width is 8 bit.\n"..
  3705. "Splitting single bus lines accross ports is not "..
  3706. "supported for data bit lines.\n"..
  3707. "In 8 bit mode all data lines have to be aligned "..
  3708. "in one row.\n"..
  3709. "This option is actually not supported in this driver.",
  3710. requires = { "LCD_GPIO" },
  3711. flavor = "booldata",
  3712. exclusivity = { "LCD_IF_8BIT", "LCD_IF_4BIT" },
  3713. provides = { "LCD_IF_8BIT" },
  3714. file = "include/cfg/lcd.h"
  3715. },
  3716. {
  3717. macro = "LCD_IF_4BIT",
  3718. brief = "Use 4-Bit Mode",
  3719. description = "Select parallel bus width is 4 bit."..
  3720. "Splitting single bus lines accross ports is not"..
  3721. "supported for data bit lines.",
  3722. requires = { "LCD_GPIO" },
  3723. flavor = "booldata",
  3724. exclusivity = { "LCD_IF_8BIT", "LCD_IF_4BIT" },
  3725. provides = { "LCD_IF_4BIT" },
  3726. file = "include/cfg/lcd.h"
  3727. },
  3728. --
  3729. -- Selection of parallel interface parameters
  3730. --
  3731. {
  3732. macro = "LCD_DATA_PIO_ID",
  3733. brief = "Port of LCD data pins",
  3734. requires = { "LCD_GPIO" },
  3735. description = "Port of the below defined data pins. Valid for "..
  3736. "both, single bit definitions or LSB.",
  3737. type = "enumerated",
  3738. choices = function() GetGpioBanks() end,
  3739. file = "include/cfg/lcd.h"
  3740. },
  3741. {
  3742. macro = "LCD_DATA_LSB",
  3743. brief = "Least Significant Data Bit",
  3744. requires = { "LCD_GPIO" },
  3745. description = "Bit number of the least significant data bit. The remaining "..
  3746. "data bits must be connected to the following port bits.",
  3747. type = "enumerated",
  3748. choices = function() GetGpioBits() end,
  3749. file = "include/cfg/lcd.h"
  3750. },
  3751. {
  3752. macro = "LCD_DATA_BIT0",
  3753. brief = "Data Bit 0",
  3754. requires = { "LCD_GPIO", "LCD_IF_4BIT" },
  3755. description = "Port bit connected to LCD data bit 0.\n"..
  3756. "Not used if LCD_DATA_LSB is defined.\n",
  3757. type = "enumerated",
  3758. choices = function() GetGpioBits() end,
  3759. file = "include/cfg/lcd.h"
  3760. },
  3761. {
  3762. macro = "LCD_DATA_BIT1",
  3763. brief = "Data Bit 1",
  3764. requires = { "LCD_GPIO", "LCD_IF_4BIT" },
  3765. type = "enumerated",
  3766. requires = { "LCD_IF_4BIT" },
  3767. choices = function() GetGpioBits() end,
  3768. file = "include/cfg/lcd.h"
  3769. },
  3770. {
  3771. macro = "LCD_DATA_BIT2",
  3772. brief = "Data Bit 2",
  3773. requires = { "LCD_GPIO", "LCD_IF_4BIT" },
  3774. type = "enumerated",
  3775. choices = function() GetGpioBits() end,
  3776. file = "include/cfg/lcd.h"
  3777. },
  3778. {
  3779. macro = "LCD_DATA_BIT3",
  3780. brief = "Data Bit 3",
  3781. requires = { "LCD_GPIO", "LCD_IF_4BIT" },
  3782. type = "enumerated",
  3783. choices = function() GetGpioBits() end,
  3784. file = "include/cfg/lcd.h"
  3785. },
  3786. --
  3787. -- Selection of serial interface parameters
  3788. --
  3789. {
  3790. macro = "LCD_CLK_PIO_ID",
  3791. brief = "SPI Clock Port",
  3792. description = "Port ID of the SPI clock line.\n",
  3793. requires = { "LCD_SPI" },
  3794. type = "enumerated",
  3795. choices = function() GetGpioBanks() end,
  3796. file = "include/cfg/lcd.h"
  3797. },
  3798. {
  3799. macro = "LCD_CLK_BIT",
  3800. brief = "SPI Clock Bit",
  3801. description = "Port bit of the SPI clock line. ",
  3802. requires = { "LCD_SPI" },
  3803. type = "enumerated",
  3804. choices = function() GetGpioBits() end,
  3805. file = "include/cfg/lcd.h"
  3806. },
  3807. {
  3808. macro = "LCD_MOSI_PIO_ID",
  3809. brief = "SPI Clock Port",
  3810. description = "Port ID of the SPI MOSI line.\n",
  3811. requires = { "LCD_SPI" },
  3812. type = "enumerated",
  3813. choices = function() GetGpioBanks() end,
  3814. file = "include/cfg/lcd.h"
  3815. },
  3816. {
  3817. macro = "LCD_MOSI_BIT",
  3818. brief = "SPI MOSI Bit",
  3819. description = "Port bit of the SPI clock line. ",
  3820. requires = { "LCD_SPI" },
  3821. type = "enumerated",
  3822. choices = function() GetGpioBits() end,
  3823. file = "include/cfg/lcd.h"
  3824. },
  3825. --
  3826. -- Selection of display control lines
  3827. --
  3828. {
  3829. macro = "LCD_EN_PIO_ID",
  3830. brief = "LCD Enable Port",
  3831. description = "Port ID of the Enable line.\n"..
  3832. "For parallel chips this is the active high enable signal.\n"..
  3833. "For serial chips this is the active low chip select line.",
  3834. type = "enumerated",
  3835. choices = function() GetGpioBanks() end,
  3836. file = "include/cfg/lcd.h"
  3837. },
  3838. {
  3839. macro = "LCD_EN_BIT",
  3840. brief = "Enable Bit",
  3841. description = "Port bit of the LCD enable line. "..
  3842. "This line must be exclusively reserved."..
  3843. "For parallel chips this is the active high enable signal.\n"..
  3844. "For serial chips this is the active low chip select line.",
  3845. default = "4",
  3846. type = "enumerated",
  3847. choices = function() GetGpioBits() end,
  3848. file = "include/cfg/lcd.h"
  3849. },
  3850. {
  3851. macro = "LCD_RS_PIO_ID",
  3852. brief = "LCD Register Select Port",
  3853. description = "Port ID of the Register Select line.",
  3854. type = "enumerated",
  3855. choices = function() GetGpioBanks() end,
  3856. file = "include/cfg/lcd.h"
  3857. },
  3858. {
  3859. macro = "LCD_RS_BIT",
  3860. brief = "Register Select Bit",
  3861. description = "Port bit of the LCD register select line. "..
  3862. "May be shared.",
  3863. default = "7",
  3864. type = "enumerated",
  3865. choices = function() GetGpioBits() end,
  3866. file = "include/cfg/lcd.h"
  3867. },
  3868. --
  3869. -- Selection of optional display control lines
  3870. --
  3871. {
  3872. macro = "LCD_RW_PIO_ID",
  3873. brief = "LCD Read/Write Select Port",
  3874. description = "Optional port base of the Read/Write Select line."..
  3875. "Driver supports display confiurations with R/W tied to 0.\n"..
  3876. "For this, leave this entry blank.",
  3877. type = "enumerated",
  3878. choices = function() GetGpioBanks() end,
  3879. file = "include/cfg/lcd.h"
  3880. },
  3881. {
  3882. macro = "LCD_RW_BIT",
  3883. brief = "Read/Write Bit",
  3884. description = "Optional port ID of the Read/Write Select line."..
  3885. "Driver supports display confiurations with R/W tied to 0.\n"..
  3886. "For this, leave this entry blank.",
  3887. type = "enumerated",
  3888. choices = function() GetGpioBits() end,
  3889. file = "include/cfg/lcd.h"
  3890. },
  3891. {
  3892. macro = "LCD_EN2_PIO_ID",
  3893. brief = "LCD Enable Port 2",
  3894. requires = { "LCD_GPIO" },
  3895. description = "Optional port base of the 2nd Enable line. "..
  3896. "This line must be exclusively reserved.\n"..
  3897. "This is only used on large 4x40 character displays.",
  3898. type = "enumerated",
  3899. choices = function() GetGpioBanks() end,
  3900. file = "include/cfg/lcd.h"
  3901. },
  3902. {
  3903. macro = "LCD_EN2_BIT",
  3904. brief = "LCD Enable-2 Bit",
  3905. requires = { "LCD_GPIO" },
  3906. description = "Optional port bit of the 2nd LCD enable line. "..
  3907. "This is only used on large 4x40 character displays.\n"..
  3908. "This line must be exclusively reserved.",
  3909. type = "enumerated",
  3910. choices = function() GetGpioBits() end,
  3911. file = "include/cfg/lcd.h"
  3912. },
  3913. {
  3914. macro = "LCD_RST_PIO_ID",
  3915. brief = "LCD Reset Port",
  3916. description = "Optional port base of the LCD Reset line. "..
  3917. "This line must be exclusively reserved.\n"..
  3918. "Some LCD Drivers support an optional reset line.\n"..
  3919. "This is currently not supported by this driver!",
  3920. type = "enumerated",
  3921. choices = function() GetGpioBanks() end,
  3922. file = "include/cfg/lcd.h"
  3923. },
  3924. {
  3925. macro = "LCD_RST_BIT",
  3926. brief = "LCD Reset Bit",
  3927. description = "Optional port bit of the 2nd LCD enable line. "..
  3928. "This line must be exclusively reserved.\n"..
  3929. "Some LCD Drivers support an optional reset line.\n"..
  3930. "This is currently not supported by this driver!",
  3931. type = "enumerated",
  3932. choices = function() GetGpioBits() end,
  3933. file = "include/cfg/lcd.h"
  3934. },
  3935. },
  3936. },
  3937. --
  3938. -- STM32F I2S Audio Device Interface
  3939. --
  3940. {
  3941. name = "nutarch_cm3_stm32f_tlv320",
  3942. brief = "TLV320 DAC",
  3943. requires = { "HW_EXT_CALYPSO" },
  3944. provides = { "HW_AUDIO_DAC" },
  3945. sources = { "arm/dev/tlv320dac.c" },
  3946. },
  3947. --
  3948. -- STM32 PWMs using hardware timer
  3949. --
  3950. {
  3951. name = "nutarch_cm3_stm32_pwm0",
  3952. brief = "STM32 PWM Output 0",
  3953. description = "STM32 PWM_Output 0.",
  3954. sources = { "cm3/dev/stm/stm32_pwm_0.c" },
  3955. options =
  3956. {
  3957. {
  3958. macro = "STM32_PWM0_TIMER_ID",
  3959. brief = "STM32 32Bit PWM0 Timer ID",
  3960. description = "Select Timer for PWM0 output. Check for availability on selected device.",
  3961. type = "enumerated",
  3962. choices = { "1", "2", "3", "4", "5", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" },
  3963. file = "include/cfg/pwm.h",
  3964. },
  3965. {
  3966. macro = "STM32_PWM0_TIMER_CHANNEL",
  3967. brief = "STM32 32Bit PWM0 Timer Channel",
  3968. description = "Select Timer Channel for PWM0 output. Check for availability on selected device.",
  3969. type = "enumerated",
  3970. choices = { "1", "2", "3", "4" },
  3971. file = "include/cfg/pwm.h",
  3972. },
  3973. {
  3974. macro = "STM32_PWM0_PIN",
  3975. brief = "PIN for STM32 PWM0 output",
  3976. description = "Port bit used for PWM0. Only some pins are valid!",
  3977. type = "enumerated",
  3978. choices = function() return GetGpioBits() end,
  3979. file = "include/cfg/pwm.h",
  3980. },
  3981. {
  3982. macro = "STM32_PWM0_PORT",
  3983. brief = "PORT for STM32 PWM0 output",
  3984. description = "Port used for PWM0. Only some ports are valid!",
  3985. type = "enumerated",
  3986. choices = function() return GetGpioPortIds() end,
  3987. file = "include/cfg/pwm.h",
  3988. },
  3989. }
  3990. },
  3991. {
  3992. name = "nutarch_cm3_stm32_pwm1",
  3993. brief = "STM32 PWM Output 1",
  3994. description = "STM32 PWM_Output 1.",
  3995. sources = { "cm3/dev/stm/stm32_pwm_1.c" },
  3996. options =
  3997. {
  3998. {
  3999. macro = "STM32_PWM1_TIMER_ID",
  4000. brief = "STM32 32Bit PWM1 Timer ID",
  4001. description = "Select Timer for PWM1 output. Check for availability on selected device.",
  4002. type = "enumerated",
  4003. choices = { "1", "2", "3", "4", "5", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" },
  4004. file = "include/cfg/pwm.h",
  4005. },
  4006. {
  4007. macro = "STM32_PWM1_TIMER_CHANNEL",
  4008. brief = "STM32 32Bit PWM1 Timer Channel",
  4009. description = "Select Timer Channel for PWM1 output. Check for availability on selected device.",
  4010. type = "enumerated",
  4011. choices = { "1", "2", "3", "4" },
  4012. file = "include/cfg/pwm.h",
  4013. },
  4014. {
  4015. macro = "STM32_PWM1_PIN",
  4016. brief = "PIN for STM32 PWM1 output",
  4017. description = "Port bit used for PWM1. Only some pins are valid!",
  4018. type = "enumerated",
  4019. choices = function() return GetGpioBits() end,
  4020. file = "include/cfg/pwm.h",
  4021. },
  4022. {
  4023. macro = "STM32_PWM1_PORT",
  4024. brief = "PORT for STM32 PWM1 output",
  4025. description = "Port used for PWM1. Only some ports are valid!",
  4026. type = "enumerated",
  4027. choices = function() return GetGpioPortIds() end,
  4028. file = "include/cfg/pwm.h",
  4029. },
  4030. }
  4031. },
  4032. --
  4033. -- STM32 OWI using hardware timer
  4034. --
  4035. {
  4036. name = "nutarch_cm3_stm32_owi",
  4037. brief = "STM32 OWI with hardware timer",
  4038. description = "STM32 OWI with hardware timer, library compile time configured",
  4039. provides = { "OWIBUS" },
  4040. sources = { "cm3/dev/stm/owibus0stm32tim.c" },
  4041. options =
  4042. {
  4043. {
  4044. macro = "STM32TIM_OWI0_PIN",
  4045. brief = "PIN for STM32 hardware timer OWI0 bus",
  4046. description = "Port bit used for OWI Bus 0. Only some pins are valid!",
  4047. type = "enumerated",
  4048. choices = function() return GetGpioBits() end,
  4049. file = "include/cfg/owi.h",
  4050. },
  4051. {
  4052. macro = "STM32TIM_OWI0_PORT",
  4053. brief = "PORT for STM32 hardware timer OWI0 bus",
  4054. description = "Port used for OWI Bus 0. Only some ports are valid!",
  4055. type = "enumerated",
  4056. choices = function() return GetGpioPortIds() end,
  4057. file = "include/cfg/owi.h",
  4058. },
  4059. {
  4060. macro = "STM32TIM_OWI0_TIMER_ID",
  4061. brief = "Timer for STM32 hardware timer OWI0 bus",
  4062. description = "Timer used for OWI Bus 0. Requires at least dual channel!",
  4063. type = "enumerated",
  4064. choices = function() return GetStmTimers2ChIrq() end,
  4065. file = "include/cfg/owi.h",
  4066. },
  4067. {
  4068. macro = "STM32TIM_OWI0_CHANNEL",
  4069. brief = "Channel for STM32 hardware timer OWI0 bus",
  4070. description = "Channel used for STM32 hardware timer OWI0 bus. Check for Channel 3/4 availability!",
  4071. type = "enumerated",
  4072. choices = { "1", "2", "3", "4" },
  4073. file = "include/cfg/owi.h",
  4074. },
  4075. {
  4076. macro = "STM32TIM_OWI0_REMAP",
  4077. brief = "REMAP for STM32 hardware timer OWI0 bus",
  4078. requires = { "HW_MCU_STM32F10X" },
  4079. description = "Give Remap used for STM32F1 hardware timer OWI0 bus if needed!",
  4080. type = "interger",
  4081. default = "0",
  4082. file = "include/cfg/owi.h",
  4083. },
  4084. }
  4085. },
  4086. --
  4087. -- STM32F1/L1 DMA Interface
  4088. --
  4089. {
  4090. name = "nutarch_cm3_stm32f1_dma1",
  4091. brief = "STM32F1/L1 DMA1 Controller",
  4092. description = "Generic DMA Support for F1/L1",
  4093. requires = { "HW_MCU_STM32", "HW_DMA1_STM32F1" },
  4094. provides = { "HW_DMA1_F1" },
  4095. sources = { "cm3/dev/stm/stm32f1_dma.c" }
  4096. },
  4097. {
  4098. name = "nutarch_cm3_stm32f1_dma2",
  4099. brief = "STM32F1/L1 DMA2 Controller",
  4100. description = "Generic DMA Support for F1/L1",
  4101. requires = { "HW_MCU_STM32", "HW_DMA2_STM32F1" },
  4102. provides = { "HW_DMA2_F1" },
  4103. sources = { "cm3/dev/stm/stm32f1_dma.c" }
  4104. },
  4105. --
  4106. -- STM32F2/F4 DMA Interface
  4107. --
  4108. {
  4109. name = "nutarch_cm3_stm32f2_dma1",
  4110. brief = "STM32F2/F4 DMA1 Controller",
  4111. description = "Generic DMA1 Support for F2/F4",
  4112. requires = { "HW_MCU_STM32", "HW_DMA1_STM32F2" },
  4113. provides = { "HW_DMA1_F2" },
  4114. sources = { "cm3/dev/stm/stm32f2_dma.c"}
  4115. },
  4116. {
  4117. name = "nutarch_cm3_stm32f2_dma2",
  4118. brief = "STM32F2/F4 DMA2 Controller",
  4119. description = "Generic DMA2 Support for F2/F4",
  4120. requires = { "HW_MCU_STM32", "HW_DMA2_STM32F2" },
  4121. provides = { "HW_DMA2_F2" },
  4122. sources = { "cm3/dev/stm/stm32f2_dma.c" }
  4123. },
  4124. --
  4125. -- STM32 Signal handler
  4126. {
  4127. name = "nutarch_cm3_stm32_sig",
  4128. brief = "STM32 Signals ",
  4129. description = "Helper to create the sig_DEVXX entries",
  4130. sources = { "cm3/dev/stm/ih_stm32.c"},
  4131. options =
  4132. {
  4133. {
  4134. macro = "HW_RTC_STM32F1",
  4135. brief = "RTC V1 Availability",
  4136. description = "RTC V1 Availability",
  4137. requires = { "HW_RTC_STM32F1" },
  4138. default = "1",
  4139. type = "integer",
  4140. file = "include/cfg/devices.h"
  4141. },
  4142. {
  4143. macro = "HW_RTC_STM32_V2",
  4144. brief = "RTC V2 Availability",
  4145. description = "RTC V2 Availability",
  4146. requires = { "HW_RTC_STM32_V2" },
  4147. default = "1",
  4148. type = "integer",
  4149. file = "include/cfg/devices.h"
  4150. },
  4151. {
  4152. macro = "HW_DMA1_STM32F1",
  4153. brief = "DMA1 Availability",
  4154. description = "7 Channel DMA1 on F1/L1/F3",
  4155. requires = { "HW_DMA1_STM32F1" },
  4156. default = "1",
  4157. type = "integer",
  4158. file = "include/cfg/devices.h"
  4159. },
  4160. {
  4161. macro = "HW_DMA2_STM32F1",
  4162. brief = "DMA2 Availability",
  4163. description = "5 Channel DMA2 on F1/L1/F3",
  4164. requires = { "HW_DMA2_STM32F1" },
  4165. default = "1",
  4166. type = "integer",
  4167. file = "include/cfg/devices.h"
  4168. },
  4169. {
  4170. macro = "HW_USART2_STM32",
  4171. brief = "USART2 Availability",
  4172. description = "USART2 Availability",
  4173. requires = { "HW_USART2_STM32" },
  4174. default = "1",
  4175. type = "integer",
  4176. file = "include/cfg/devices.h"
  4177. },
  4178. {
  4179. macro = "HW_USART3_STM32",
  4180. brief = "USART3 Availability",
  4181. description = "USART3 Availability",
  4182. requires = { "HW_USART3_STM32" },
  4183. default = "1",
  4184. type = "integer",
  4185. file = "include/cfg/devices.h"
  4186. },
  4187. {
  4188. macro = "HW_UART4_STM32",
  4189. brief = "UART4 Availability",
  4190. description = "USART4 Availability",
  4191. requires = { "HW_UART4_STM32" },
  4192. default = "1",
  4193. type = "integer",
  4194. file = "include/cfg/devices.h"
  4195. },
  4196. {
  4197. macro = "HW_UART5_STM32",
  4198. brief = "UART5 Availability",
  4199. description = "USART5 Availability",
  4200. requires = { "HW_UART5_STM32" },
  4201. default = "1",
  4202. type = "integer",
  4203. file = "include/cfg/devices.h"
  4204. },
  4205. {
  4206. macro = "HW_USART6_STM32",
  4207. brief = "USART6 Availability",
  4208. description = "USART6 Availability",
  4209. requires = { "HW_USART6_STM32" },
  4210. default = "1",
  4211. type = "integer",
  4212. file = "include/cfg/devices.h"
  4213. },
  4214. {
  4215. macro = "HW_UART7_STM32",
  4216. brief = "UART7 Availability",
  4217. description = "UART7 Availability",
  4218. requires = { "HW_UART7_STM32" },
  4219. default = "1",
  4220. type = "integer",
  4221. file = "include/cfg/devices.h"
  4222. },
  4223. {
  4224. macro = "HW_UART8_STM32",
  4225. brief = "UART8 Availability",
  4226. description = "UART8 Availability",
  4227. requires = { "HW_UART8_STM32" },
  4228. default = "1",
  4229. type = "integer",
  4230. file = "include/cfg/devices.h"
  4231. },
  4232. {
  4233. macro = "HW_CAN1_STM32",
  4234. brief = "CAN1 Availability",
  4235. description = "CAN1 Availability",
  4236. requires = { "HW_CAN1_STM32" },
  4237. default = "1",
  4238. type = "integer",
  4239. file = "include/cfg/devices.h"
  4240. },
  4241. {
  4242. macro = "HW_USB_STM32",
  4243. brief = "USB FS Availability",
  4244. description = "USB Availability",
  4245. requires = { "HW_USB_STM32" },
  4246. default = "1",
  4247. type = "integer",
  4248. file = "include/cfg/devices.h"
  4249. },
  4250. {
  4251. macro = "HW_TIM1_STM32",
  4252. brief = "TIM1 Availability",
  4253. description = "TIM1 Availability",
  4254. requires = { "HW_TIM1_STM32" },
  4255. default = "1",
  4256. type = "integer",
  4257. file = "include/cfg/devices.h"
  4258. },
  4259. {
  4260. macro = "HW_TIM2_STM32",
  4261. brief = "TIM2 Availability",
  4262. description = "TIM2 Availability",
  4263. requires = { "HW_TIM2_STM32" },
  4264. default = "1",
  4265. type = "integer",
  4266. file = "include/cfg/devices.h"
  4267. },
  4268. {
  4269. macro = "HW_TIM3_STM32",
  4270. brief = "TIM3 Availability",
  4271. description = "TIM3 Availability",
  4272. requires = { "HW_TIM3_STM32" },
  4273. default = "1",
  4274. type = "integer",
  4275. file = "include/cfg/devices.h"
  4276. },
  4277. {
  4278. macro = "HW_TIM4_STM32",
  4279. brief = "TIM4 Availability",
  4280. description = "TIM4 Availability",
  4281. requires = { "HW_TIM4_STM32" },
  4282. default = "1",
  4283. type = "integer",
  4284. file = "include/cfg/devices.h"
  4285. },
  4286. {
  4287. macro = "HW_TIM5_STM32",
  4288. brief = "TIM5 Availability",
  4289. description = "TIM5 Availability",
  4290. requires = { "HW_TIM5_STM32" },
  4291. default = "1",
  4292. type = "integer",
  4293. file = "include/cfg/devices.h"
  4294. },
  4295. {
  4296. macro = "HW_TIM6_STM32",
  4297. brief = "TIM6 Availability",
  4298. description = "TIM6 Availability",
  4299. requires = { "HW_TIM6_STM32" },
  4300. default = "1",
  4301. type = "integer",
  4302. file = "include/cfg/devices.h"
  4303. },
  4304. {
  4305. macro = "HW_TIM7_STM32",
  4306. brief = "TIM7 Availability",
  4307. description = "TIM7 Availability",
  4308. requires = { "HW_TIM7_STM32" },
  4309. default = "1",
  4310. type = "integer",
  4311. file = "include/cfg/devices.h"
  4312. },
  4313. {
  4314. macro = "HW_TIM8_STM32",
  4315. brief = "TIM8 Availability",
  4316. description = "TIM8 Availability",
  4317. requires = { "HW_TIM8_STM32" },
  4318. default = "1",
  4319. type = "integer",
  4320. file = "include/cfg/devices.h"
  4321. },
  4322. {
  4323. macro = "HW_TIM9_STM32",
  4324. brief = "TIM9 Availability",
  4325. description = "TIM9 Availability",
  4326. requires = { "HW_TIM9_STM32" },
  4327. default = "1",
  4328. type = "integer",
  4329. file = "include/cfg/devices.h"
  4330. },
  4331. {
  4332. macro = "HW_TIM10_STM32",
  4333. brief = "TIM10 Availability",
  4334. description = "TIM10 Availability",
  4335. requires = { "HW_TIM10_STM32" },
  4336. default = "1",
  4337. type = "integer",
  4338. file = "include/cfg/devices.h"
  4339. },
  4340. {
  4341. macro = "HW_TIM11_STM32",
  4342. brief = "TIM11 Availability",
  4343. description = "TIM11 Availability",
  4344. requires = { "HW_TIM11_STM32" },
  4345. default = "1",
  4346. type = "integer",
  4347. file = "include/cfg/devices.h"
  4348. },
  4349. {
  4350. macro = "HW_TIM12_STM32",
  4351. brief = "TIM12 Availability",
  4352. description = "TIM12 Availability",
  4353. requires = { "HW_TIM12_STM32" },
  4354. default = "1",
  4355. type = "integer",
  4356. file = "include/cfg/devices.h"
  4357. },
  4358. {
  4359. macro = "HW_TIM13_STM32",
  4360. brief = "TIM13 Availability",
  4361. description = "TIM13 Availability",
  4362. requires = { "HW_TIM13_STM32" },
  4363. default = "1",
  4364. type = "integer",
  4365. file = "include/cfg/devices.h"
  4366. },
  4367. {
  4368. macro = "HW_TIM14_STM32",
  4369. brief = "TIM14 Availability",
  4370. description = "TIM14 Availability",
  4371. requires = { "HW_TIM14_STM32" },
  4372. default = "1",
  4373. type = "integer",
  4374. file = "include/cfg/devices.h"
  4375. },
  4376. {
  4377. macro = "HW_TIM15_STM32",
  4378. brief = "TIM15 Availability",
  4379. description = "TIM15 Availability",
  4380. requires = { "HW_TIM15_STM32" },
  4381. default = "1",
  4382. type = "integer",
  4383. file = "include/cfg/devices.h"
  4384. },
  4385. {
  4386. macro = "HW_TIM16_STM32",
  4387. brief = "TIM16 Availability",
  4388. description = "TIM16 Availability",
  4389. requires = { "HW_TIM16_STM32" },
  4390. default = "1",
  4391. type = "integer",
  4392. file = "include/cfg/devices.h"
  4393. },
  4394. {
  4395. macro = "HW_TIM17_STM32",
  4396. brief = "TIM17 Availability",
  4397. description = "TIM17 Availability",
  4398. requires = { "HW_TIM17_STM32" },
  4399. default = "1",
  4400. type = "integer",
  4401. file = "include/cfg/devices.h"
  4402. },
  4403. {
  4404. macro = "HW_TIM19_STM32",
  4405. brief = "TIM19 Availability",
  4406. description = "TIM19 Availability",
  4407. requires = { "HW_TIM19_STM32" },
  4408. default = "1",
  4409. type = "integer",
  4410. file = "include/cfg/devices.h"
  4411. },
  4412. {
  4413. macro = "HW_I2C2_STM32",
  4414. brief = "I2C2 Availability",
  4415. description = "I2C2 Availability",
  4416. requires = { "HW_I2C2_STM32" },
  4417. default = "1",
  4418. type = "integer",
  4419. file = "include/cfg/devices.h"
  4420. },
  4421. {
  4422. macro = "HW_I2C3_STM32",
  4423. brief = "I2C3 Availability",
  4424. description = "I2C3 Availability",
  4425. requires = { "HW_I2C3_STM32" },
  4426. default = "1",
  4427. type = "integer",
  4428. file = "include/cfg/devices.h"
  4429. },
  4430. {
  4431. macro = "HW_SPI2_STM32",
  4432. brief = "SPI2 Availability",
  4433. description = "SPI2 Availability",
  4434. requires = { "HW_SPI2_STM32" },
  4435. default = "1",
  4436. type = "integer",
  4437. file = "include/cfg/devices.h"
  4438. },
  4439. {
  4440. macro = "HW_SPI3_STM32",
  4441. brief = "SPI3 Availability",
  4442. description = "SPI3 Availability",
  4443. requires = { "HW_SPI3_STM32" },
  4444. default = "1",
  4445. type = "integer",
  4446. file = "include/cfg/devices.h"
  4447. },
  4448. {
  4449. macro = "HW_SPI4_STM32",
  4450. brief = "SPI4 Availability",
  4451. description = "SPI4 Availability",
  4452. requires = { "HW_SPI4_STM32" },
  4453. default = "1",
  4454. type = "integer",
  4455. file = "include/cfg/devices.h"
  4456. },
  4457. {
  4458. macro = "HW_SPI5_STM32",
  4459. brief = "SPI5 Availability",
  4460. description = "SPI5 Availability",
  4461. requires = { "HW_SPI5_STM32" },
  4462. default = "1",
  4463. type = "integer",
  4464. file = "include/cfg/devices.h"
  4465. },
  4466. {
  4467. macro = "HW_SPI6_STM32",
  4468. brief = "SPI6 Availability",
  4469. description = "SPI6 Availability",
  4470. requires = { "HW_SPI6_STM32" },
  4471. default = "1",
  4472. type = "integer",
  4473. file = "include/cfg/devices.h"
  4474. },
  4475. {
  4476. macro = "HW_SDIO_STM32",
  4477. brief = "SDIO Availability",
  4478. description = "SDIO Availability",
  4479. requires = { "HW_SDIO_STM32" },
  4480. default = "1",
  4481. type = "integer",
  4482. file = "include/cfg/devices.h"
  4483. },
  4484. {
  4485. macro = "HW_SAI1_STM32",
  4486. brief = "SAI1 Availability",
  4487. description = "SAI1 Availability",
  4488. requires = { "HW_SAI1_STM32" },
  4489. default = "1",
  4490. type = "integer",
  4491. file = "include/cfg/devices.h"
  4492. },
  4493. {
  4494. macro = "HW_ADC_STM32",
  4495. brief = "ADC Global interrupt on F2/4",
  4496. description = "ADC Global interrupt on F2/4",
  4497. requires = { "HW_ADC_STM32" },
  4498. default = "1",
  4499. type = "integer",
  4500. file = "include/cfg/devices.h"
  4501. },
  4502. {
  4503. macro = "HW_ADC1_STM32F1",
  4504. brief = "ADC1 Single Interrupt on F1",
  4505. description = "ADC1 Single Interrupt on F1",
  4506. requires = { "HW_ADC1_STM32F1" },
  4507. default = "1",
  4508. type = "integer",
  4509. file = "include/cfg/devices.h"
  4510. },
  4511. {
  4512. macro = "HW_ADC1_STM32",
  4513. brief = "ADC1 Single Interrupt",
  4514. description = "ADC1 Single Interrupt",
  4515. requires = { "HW_ADC1_STM32" },
  4516. default = "1",
  4517. type = "integer",
  4518. file = "include/cfg/devices.h"
  4519. },
  4520. {
  4521. macro = "HW_ADC1_2_STM32F1",
  4522. brief = "ADC1_2 Interrupt on F1",
  4523. description = "ADC1_2 Interrupt on F1",
  4524. requires = { "HW_ADC1_2_STM32F1" },
  4525. default = "1",
  4526. type = "integer",
  4527. file = "include/cfg/devices.h"
  4528. },
  4529. {
  4530. macro = "HW_ADC1_2_STM32",
  4531. brief = "ADC1_2 Interrupt",
  4532. description = "",
  4533. requires = { "HW_ADC1_2_STM32" },
  4534. default = "1",
  4535. type = "integer",
  4536. file = "include/cfg/devices.h"
  4537. },
  4538. {
  4539. macro = "HW_ADC3_STM32F1",
  4540. brief = "ADC3 Availability on F1",
  4541. description = "ADC3 Availability on F1",
  4542. requires = { "HW_ADC3_STM32F1" },
  4543. default = "1",
  4544. type = "integer",
  4545. file = "include/cfg/devices.h"
  4546. },
  4547. {
  4548. macro = "HW_ADC3_STM32",
  4549. brief = "ADC3 Availability",
  4550. description = "ADC3 Availability",
  4551. requires = { "HW_ADC3_STM32" },
  4552. default = "1",
  4553. type = "integer",
  4554. file = "include/cfg/devices.h"
  4555. },
  4556. {
  4557. macro = "HW_ADC4_STM32",
  4558. brief = "ADC4 Availability",
  4559. description = "ADC4 Availability",
  4560. requires = { "HW_ADC4_STM32" },
  4561. default = "1",
  4562. type = "integer",
  4563. file = "include/cfg/devices.h"
  4564. },
  4565. {
  4566. macro = "HW_SDADC1_STM32",
  4567. brief = "SDADC1 Availability",
  4568. description = "SDADC1 Availability",
  4569. requires = { "HW_SDADC1_STM32" },
  4570. default = "1",
  4571. type = "integer",
  4572. file = "include/cfg/devices.h"
  4573. },
  4574. {
  4575. macro = "HW_SDADC2_STM32",
  4576. brief = "SDADC2 Availability",
  4577. description = "SDADC2 Availability",
  4578. requires = { "HW_SDADC2_STM32" },
  4579. default = "1",
  4580. type = "integer",
  4581. file = "include/cfg/devices.h"
  4582. },
  4583. {
  4584. macro = "HW_SDADC3_STM32",
  4585. brief = "SDADC3 Availability",
  4586. description = "SDADC3 Availability",
  4587. requires = { "HW_SDADC3_STM32" },
  4588. default = "1",
  4589. type = "integer",
  4590. file = "include/cfg/devices.h"
  4591. },
  4592. {
  4593. macro = "HW_HASH_STM32",
  4594. brief = "HASH Availability",
  4595. description = "HASH Availability",
  4596. requires = { "HW_HASH_STM32" },
  4597. default = "1",
  4598. type = "integer",
  4599. file = "include/cfg/devices.h"
  4600. },
  4601. {
  4602. macro = "HW_HASH_RNG_STM32",
  4603. brief = "HASH and RNG Availability",
  4604. description = "HASH and RNG Availability",
  4605. requires = { "HW_HASH_RNG_STM32" },
  4606. default = "1",
  4607. type = "integer",
  4608. file = "include/cfg/devices.h"
  4609. },
  4610. {
  4611. macro = "HW_DCMI_STM32",
  4612. brief = "CAMERA Availability",
  4613. description = "CAMERA interface Availability",
  4614. requires = { "HW_DCMI_STM32" },
  4615. default = "1",
  4616. type = "integer",
  4617. file = "include/cfg/devices.h"
  4618. },
  4619. {
  4620. macro = "HW_LTDC_STM32",
  4621. brief = "LTDC Availability",
  4622. description = "LTDC Availability",
  4623. requires = { "HW_LTDC_STM32" },
  4624. default = "1",
  4625. type = "integer",
  4626. file = "include/cfg/devices.h"
  4627. },
  4628. {
  4629. macro = "HW_DMA2D_STM32",
  4630. brief = "DMA2D Availability",
  4631. description = "DMA2D Availability",
  4632. requires = { "HW_DMA2D_STM32" },
  4633. default = "1",
  4634. type = "integer",
  4635. file = "include/cfg/devices.h"
  4636. },
  4637. {
  4638. macro = "HW_EMAC_STM32",
  4639. brief = "Ethernet Availability",
  4640. description = "Ethernet Availability",
  4641. requires = { "HW_EMAC_STM32" },
  4642. default = "1",
  4643. type = "integer",
  4644. file = "include/cfg/devices.h"
  4645. },
  4646. {
  4647. macro = "HW_FSMC_STM32",
  4648. brief = "FSMC Availability",
  4649. description = "FSMC Availability",
  4650. requires = { "HW_FSMC_STM32" },
  4651. default = "1",
  4652. type = "integer",
  4653. file = "include/cfg/devices.h"
  4654. },
  4655. {
  4656. macro = "HW_FMC_STM32",
  4657. brief = "FMC Availability",
  4658. description = "FMC Availability",
  4659. requires = { "HW_FMC_STM32" },
  4660. default = "1",
  4661. type = "integer",
  4662. file = "include/cfg/devices.h"
  4663. },
  4664. {
  4665. macro = "HW_COMP1_2_3_STM32",
  4666. brief = "COMP1_2_3 Availability",
  4667. description = "COMP1_2_3 Availability",
  4668. requires = { "HW_COMP1_2_3_STM32" },
  4669. default = "1",
  4670. type = "integer",
  4671. file = "include/cfg/devices.h"
  4672. },
  4673. {
  4674. macro = "HW_COMP4_5_6_STM32",
  4675. brief = "COMP4_5_6 Availability",
  4676. description = "COMP4_5_6 Availability",
  4677. requires = { "HW_COMP4_5_6_STM32" },
  4678. default = "1",
  4679. type = "integer",
  4680. file = "include/cfg/devices.h"
  4681. },
  4682. {
  4683. macro = "HW_COMP7_STM32",
  4684. brief = "COMP7 Availability",
  4685. description = "COMP7 Availability",
  4686. requires = { "HW_COMP7_STM32" },
  4687. default = "1",
  4688. type = "integer",
  4689. file = "include/cfg/devices.h"
  4690. },
  4691. {
  4692. macro = "HW_COMP_STM32",
  4693. brief = "COMP Availability",
  4694. description = "COMP Availability",
  4695. requires = { "HW_COMP_STM32" },
  4696. default = "1",
  4697. type = "integer",
  4698. file = "include/cfg/devices.h"
  4699. },
  4700. {
  4701. macro = "HW_COMP_ACQ_STM32",
  4702. brief = "COMP_ACQ Availability",
  4703. description = "COMP_ACQ Availability",
  4704. requires = { "HW_COMP_ACQ_STM32" },
  4705. default = "1",
  4706. type = "integer",
  4707. file = "include/cfg/devices.h"
  4708. },
  4709. {
  4710. macro = "HW_CEC_STM32",
  4711. brief = "CEC Availability",
  4712. description = "Availability",
  4713. requires = { "HW_CEC_STM32" },
  4714. default = "1",
  4715. type = "integer",
  4716. file = "include/cfg/devices.h"
  4717. },
  4718. }
  4719. }
  4720. }