{"id":434,"date":"2017-11-24T23:27:41","date_gmt":"2017-11-24T22:27:41","guid":{"rendered":"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=434"},"modified":"2017-12-30T19:36:53","modified_gmt":"2017-12-30T18:36:53","slug":"52-encoder-library-stm32f4","status":"publish","type":"page","link":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/stm32f4\/komplette-library-liste-stm32f4\/52-encoder-library-stm32f4\/","title":{"rendered":"52-Encoder-Library (STM32F4)"},"content":{"rendered":"<p><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-previous\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/stm32f4\/komplette-library-liste-stm32f4\/51-inputcapture_pwm-library-stm32f4\/\" title=\"51-InputCapture_PWM-Library (STM32F4)\"><span class=\"meta-nav\">\u2190<\/span> 51-InputCapture_PWM-Library (STM32F4)<\/a><\/div><\/div><!-- #nav-below --><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-next\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/stm32f4\/komplette-library-liste-stm32f4\/53-cs43l22_mp3-library-stm32f4\/\" title=\"53-CS43L22_MP3-Library (STM32F4)\">53-CS43L22_MP3-Library (STM32F4) <span class=\"meta-nav\">&rarr;<\/span><\/a><\/div><\/div><!-- #nav-below --><\/p>\n<p>Wer einen (oder mehrere) Drehgeber (Rotary Encoder) an den STM32F4 anschlie\u00dfen will, kann diese Library(s) benutzen.<\/p>\n<p>Zum Messen der Signale werden zwei Kan\u00e4le von einem Timer ben\u00f6tigt. Ich habe die Librarys wieder f\u00fcr \u201cTIM2, TIM3, TIM4, TIM5\u2033 geschrieben.<\/p>\n<p>Die zwei Port-Pins die benutzt werden sollen, m\u00fcssen im C-File eingestellt werden.<\/p>\n<p>Bei der Initialisierung muss der Mode, die Drehrichtung und die Aufl\u00f6sung vom Counter eingestellt werden.<\/p>\n<p>Der Mode bestimmt bei welcher Flanke (A,B oder A+B) der Counter getriggert wird, und die Aufl\u00f6sung bestimmt ab welchem Wert der Counter\u00fcberlauf stattfindet.<\/p>\n<p>In der Software sind die Pull-Ups der Eing\u00e4nge aktiviert, der Drehgeber muss also gegen GND schalten.<\/p>\n<p><strong>Bild :<\/strong><\/p>\n<p><a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-content\/uploads\/2013\/07\/encoder.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2166\" src=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-content\/uploads\/2013\/07\/encoder-300x108.jpg\" alt=\"encoder\" width=\"300\" height=\"108\" \/><\/a><\/p>\n<p><strong>Voraussetzungen :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">Benutzte Module der CooCox-IDE : GPIO, TIM\r\nBenutzte Librarys : keine<\/pre>\n<p><strong>Enumerationen (f\u00fcr Encoder mit TIM2) :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">typedef enum {\r\n  ENC_T2_MODE_2A  = 0, \/\/ Counter Z\u00e4hlt bei jeder Flanke von Eingang_A\r\n  ENC_T2_MODE_2B  = 1, \/\/ Counter Z\u00e4hlt bei jeder Flanke von Eingang_B\r\n  ENC_T2_MODE_4AB = 2  \/\/ Counter Z\u00e4hlt bei jeder Flanke von Eingang_A UND Eingang_B\r\n}ENC_TIM2_MODE_t;<\/pre>\n<p><strong>:<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">typedef enum {\r\n  ENC_T2_TYP_NORMAL  = 0, \/\/ Counter incrementiert bei rechts\r\n  ENC_T2_TYP_REVERS  = 1  \/\/ Counter decrementiert bei rechts\r\n}ENC_TIM2_TYP_t;<\/pre>\n<p><strong>Funktionen (<strong>f\u00fcr Encoder mit TIM2<\/strong>) :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">void UB_ENCODER_TIM2_Init(ENC_TIM2_MODE_t mode, ENC_TIM2_TYP_t typ, uint16_t maxwert); \/\/ zum init vom Encoder\r\nuint16_t UB_ENCODER_TIM2_ReadPos(void);                                                \/\/ zum auslesen vom Counterwert<\/pre>\n<p><strong>Beispiel :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">\/\/--------------------------------------------------------------\r\n\/\/ File     : main.c\r\n\/\/ Datum    : 23.07.2013\r\n\/\/ Version  : 1.0\r\n\/\/ Autor    : UB\r\n\/\/ EMail    : mc-4u(@)t-online.de\r\n\/\/ Web      : www.mikrocontroller-4u.de\r\n\/\/ CPU      : STM32F4\r\n\/\/ IDE      : CooCox CoIDE 1.7.0\r\n\/\/ Module   : CMSIS_BOOT, M4_CMSIS_CORE\r\n\/\/ Funktion : Demo der Encoder Library\r\n\/\/ Hinweis  : Diese zwei Files muessen auf 8MHz stehen\r\n\/\/              \"cmsis_boot\/stm32f4xx.h\"\r\n\/\/              \"cmsis_boot\/system_stm32f4xx.c\"\r\n\/\/--------------------------------------------------------------\r\n\r\n#include \"main.h\"\r\n#include \"stm32_ub_led.h\"\r\n#include \"stm32_ub_encoder_tim2.h\"\r\n\r\nint main(void)\r\n{\r\n  uint16_t counterwert;\r\n\r\n  SystemInit(); \/\/ Quarz Einstellungen aktivieren\r\n\r\n  \/\/ init aller LEDs\r\n  UB_Led_Init();\r\n\r\n  \/\/ init vom Drehgeber (Rotary-Encoder) per Timer2\r\n  \/\/ Mode = normal, Werte [0...15]\r\n  UB_ENCODER_TIM2_Init(ENC_T2_MODE_2A, ENC_T2_TYP_NORMAL, 0x000F);\r\n\r\n  while(1)\r\n  {\r\n    \/\/ Drehgeber auslesen\r\n    counterwert=UB_ENCODER_TIM2_ReadPos();\r\n    \/\/ die 4 LEDs je nach Counterwert ein- \/ausschalten\r\n    if((counterwert&amp;0x01)==0) UB_Led_Off(LED_GREEN); else UB_Led_On(LED_GREEN);\r\n    if((counterwert&amp;0x02)==0) UB_Led_Off(LED_BLUE); else UB_Led_On(LED_BLUE);\r\n    if((counterwert&amp;0x04)==0) UB_Led_Off(LED_RED); else UB_Led_On(LED_RED);\r\n    if((counterwert&amp;0x08)==0) UB_Led_Off(LED_ORANGE); else UB_Led_On(LED_ORANGE);\r\n  }\r\n}\r\n<\/pre>\n<p>Hier die Library zum\u00a0<strong>Download :<\/strong><\/p>\n<p><a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-content\/uploads\/2013\/07\/ub_stm32f4_encoder_v100.zip\">ub_stm32f4_encoder_v100<\/a><\/p>\n<p>Hier der komplette CooCox-Projektordner zum\u00a0<strong>Download :<\/strong><\/p>\n<p><a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-content\/uploads\/2013\/07\/Demo_52_Encoder.zip\">Demo_52_Encoder<\/a><\/p>\n<h3 id=\"comments-title\">17 Antworten auf <em>52-Encoder-Library (STM32F4)<\/em><\/h3>\n<ol class=\"commentlist\">\n<li id=\"li-comment-1027\" class=\"comment even thread-even depth-1\">\n<div id=\"comment-1027\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/b2b0b82f80a9733557fde98d15b989f3?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Erat<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">12. November 2013 um 19:44<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Danke f\u00fcr den n\u00fctzlichen Beispielcode!<br \/>\nMein Encoder an den Pins PD12 und PD13 funktioniert mit deiner Bibliothek wunderbar (mit TIM4).<br \/>\nJetzt versuche ich, den Encoder an den Input-Pins A: PB14 und B: PB15 zu betreiben. Ich wollte TIM8_CH2N TIM8_CH2N verwenden (auf ABP2 statt ABP1), leider bisher ohne Erfolg: ich lese immer nur 0.<br \/>\nF\u00fcr Hinweise oder ein funktionierendes Beispiel w\u00e4re ich also dankbar! <img decoding=\"async\" class=\"wp-smiley\" src=\"wp-includes\/images\/smilies\/icon_smile.gif\" alt=\":-)\" \/><\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1033\" class=\"comment odd alt depth-2\">\n<div id=\"comment-1033\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/b2b0b82f80a9733557fde98d15b989f3?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Erat<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">13. November 2013 um 15:58<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Ich hab inzwischen noch das Datenblatt besser gelesen und gesehen, dass das wohl mit diesen beiden Pins nicht geht. Laut 14.3.16 \u201cEncoder interface mode\u201d werden zwingend die Inputs TI1 und TI2 vorausgesetzt, und die lassen sich nicht mit CH2N und CH3N verbinden. Ich werde also andere Pins verwenden m\u00fcssen\u2026<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-1896\" class=\"comment even thread-odd thread-alt depth-1\">\n<div id=\"comment-1896\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/7a04d60e57c7da266ee9a499e5bca673?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Burkhard<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">22. Juni 2014 um 12:58<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Muss es immer CH1 und CH2 sein? Bei Timer2\/5 finde ich auf dem STM32F429 Board keine freien Ports daf\u00fcr.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1897\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-2\">\n<div id=\"comment-1897\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">22. Juni 2014 um 14:32<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Ja, es muss CH1 und CH2 sein. Timer3 PB4, PA7 sind frei.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1898\" class=\"comment even depth-3\">\n<div id=\"comment-1898\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/7a04d60e57c7da266ee9a499e5bca673?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Burkhard<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">22. Juni 2014 um 20:25<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Mist, ich brauche aber 32Bit <img decoding=\"async\" class=\"wp-smiley\" src=\"wp-includes\/images\/smilies\/icon_sad.gif\" alt=\":-(\" \/><\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1899\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-4\">\n<div id=\"comment-1899\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">22. Juni 2014 um 21:00<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>dann lie\u00df den counterwert zyklisch mit einem Timer aus und benutz eine 32bit Hilfsvariable\u2026wo ist das Problem.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-1900\" class=\"comment even thread-even depth-1\">\n<div id=\"comment-1900\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/7a04d60e57c7da266ee9a499e5bca673?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Burkhard<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">22. Juni 2014 um 21:17<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hab gerne \u201csaubere\u201d L\u00f6sungen <img decoding=\"async\" class=\"wp-smiley\" src=\"wp-includes\/images\/smilies\/icon_smile.gif\" alt=\":-)\" \/> . Hab es jetzt aber zum laufen bekommen. Am Decoder fehlten die Widerst\u00e4nde. Komisch das es am STM32F407 auch ohne lief.<br \/>\nAber danke f\u00fcr deine Hilfe. Mit der Hilfsvariable behalte ich mal f\u00fcr andere Sachen im Kopf <img decoding=\"async\" class=\"wp-smiley\" src=\"wp-includes\/images\/smilies\/icon_smile.gif\" alt=\":-)\" \/> .<br \/>\nSch\u00f6nen Sonntag noch\u2026..<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<li id=\"li-comment-2781\" class=\"comment odd alt thread-odd thread-alt depth-1\">\n<div id=\"comment-2781\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/7a04d60e57c7da266ee9a499e5bca673?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Burkhard<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">6. Januar 2015 um 10:12<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Gibt es einen Interrupt der ausl\u00f6st wenn sich der Z\u00e4hlerstand vom Counter ver\u00e4ndert?<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2782\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-2782\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">6. Januar 2015 um 11:20<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>ich glaube nicht\u2026da wirst du einen externen Interrupt benutzen m\u00fcssen<br \/>\noder per Timer den Wert pollen und auf Ver\u00e4nderung abpr\u00fcfen.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-3220\" class=\"comment odd alt thread-even depth-1\">\n<div id=\"comment-3220\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/d1f00ec15c6d93f8824cc2d7482ac562?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Harry<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">6. Mai 2015 um 03:10<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Ich verstehe noch nicht wo genau festgelegt \/ ausgew\u00e4hlt wird welche Pins ich z.B. im CooCox Example mit TIM2 verwendet werden. Kann mir das jemand verraten an welche Pins ich A und B anschlie\u00dfen muss?<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-3223\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-3223\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">6. Mai 2015 um 17:50<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>im C-File ganz oben unter \u201cDefinition der zwei Rotary-Encoder Pins\u201d<br \/>\ndie Pins sind nicht beliebig, sondern h\u00e4ngen vom Timer ab.<br \/>\nIm Beispiel wird TIM2 und die Pins : PA0, PA1 benutzt<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-3420\" class=\"comment odd alt thread-odd thread-alt depth-1\">\n<div id=\"comment-3420\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/19ce53b7a2a3284c5c0bf9a9adf990ad?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Juan<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">1. Juli 2015 um 17:41<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>hallo<br \/>\nIch habe es nicht bekommen, um auf meinem stm32f429 arbeiten<br \/>\nJeder kann die Teile des Codes mit Timer3 und PB4 setzen, PA7 konfiguriert?.<br \/>\nIch bin hier, um den Arm<\/p>\n<p>Das testo Ich habe mit Google \u00fcbersetzt.<br \/>\nVerzeihen Sie, ich habe keine Ahnung von deutscher <img decoding=\"async\" class=\"wp-smiley\" src=\"wp-includes\/images\/smilies\/icon_sad.gif\" alt=\":-(\" \/><\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-3751\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-3751\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">11. Juli 2015 um 21:03<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>please write your question in english again.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-4131\" class=\"comment odd alt thread-even depth-1\">\n<div id=\"comment-4131\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/38af3f21aa7fd7ade51b0e9f90ff216b?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Flo<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">9. September 2015 um 10:37<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hi,<br \/>\nich versuche GPIO\u201dE\u201d Pin 5 und 6 mittels TIM9 Ch1 und Ch2 zum laufen zu bringen, aber dies funktioniert nicht. Ich habe alle Timer und pins,\u2026. angepasst an TIM 9 und GPIO E, aber ich bekomme immer nur Position \u201c0\u2033 ausgelesen.<\/p>\n<p>Ich benutze das STM32E407 Board.<\/p>\n<p>Die anderen Timer von dir funktionieren ohne Probleme.<\/p>\n<p>Hat es mit TIM9 etwas besonderes auf sich, da es ein \u201chigh\u201d speed timer ist?<br \/>\nKannst du mir bitte weiterhelfen.<\/p>\n<p>Danke und viele Gr\u00fc\u00dfe<br \/>\nFlo<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-4132\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-4132\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">9. September 2015 um 21:47<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Der Encoder-Mode funktioniert nur beim Timer-1,8,2,3,4,5.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-4324\" class=\"comment odd alt thread-odd thread-alt depth-1\">\n<div id=\"comment-4324\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/aac2570b2d68c4f1af8c79c9732f92ac?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Georgiy<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">12. November 2015 um 12:50<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Sorry for my english. Please Teach how to make an interrupt encoder included, and did not work in the main loop? Thank you.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-4328\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-4328\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">13. November 2015 um 20:24<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>you dont need an interrupt for the rotary encoder.<br \/>\nyou can read the actual counter value at any time you want.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Wer einen (oder mehrere) Drehgeber (Rotary Encoder) an den STM32F4 anschlie\u00dfen will, kann diese Library(s) benutzen. Zum Messen der Signale werden zwei Kan\u00e4le von einem Timer ben\u00f6tigt. Ich habe die Librarys wieder f\u00fcr \u201cTIM2, TIM3, TIM4, TIM5\u2033 geschrieben. Die zwei &hellip; <a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/stm32f4\/komplette-library-liste-stm32f4\/52-encoder-library-stm32f4\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":144,"menu_order":52,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[128],"tags":[200,9,7],"class_list":["post-434","page","type-page","status-publish","hentry","category-stm32f4","tag-drehgeber","tag-library","tag-stm32f4"],"_links":{"self":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/pages\/434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/comments?post=434"}],"version-history":[{"count":3,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/pages\/434\/revisions"}],"predecessor-version":[{"id":1591,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/pages\/434\/revisions\/1591"}],"up":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/pages\/144"}],"wp:attachment":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/media?parent=434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/categories?post=434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-json\/wp\/v2\/tags?post=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}