SlideShare a Scribd company logo
Part 2: GPIO meets LED
ben6
2014-04-21
F9-Microkernel App Development
Agenda
• Why we have to know GPIO?
• What’s GPIO?
• How to use GPIO?
F9
Why we have to know GPIO?
Basis of external hardware control
GPIO (General-purpose input/output)
Storage
devices
NICs Buttons LED
…
Agenda
• Why we have to know GPIO?
• What’s GPIO?
– F9 GPIO API for basic app
– Code reading about F9 GPIO Hooks
• How to use GPIO?
F9
What’s GPIO?
• GPIO -- General-purpose
input/output
– Generic pin on a chip whose behavior
can be controlled by the user at run
time
– Support DMA (Direct Memory Access)
control
STM32F407VGT6 GPIOx
GPIO input
• Floating: unknown voltage input stage
• Pull-up: connect to high voltage
• Pull-down: connected to ground
• Non-analog mode: input data register (GPIO_IDR)
Memory Devices
gpio_input_bit(port, pin)
{
if (*GPIO_IDR(port) & (1 << pin))
return 1;
return 0;
}
GPIO output
• push-pull with pull-up/pull-down
• open-drain with pull-up/pull-down
• Non-analog mode, output data register (GPIO_ODR)
Memory Devices
*GPIO_ODR(GPIOA) |= (1 << pin);
Agenda
• Why we have to know GPIO?
• What’s GPIO?
– F9 GPIO API for basic app
– Code reading about F9 GPIO Hooks
• How to use GPIO?
F9
PR #86 GPIO V1 implementation
Kernel part
• include/thread.h
• include/user-gpioer.h
• kernel/ipc.c
• kernel/user-gpioer.c
App part: library and app
• user/apps/gpioer/main.c
• user/include/gpioer.h
• user/lib/io/gpioer.c
Pull request#86 https://github.com/f9micro/f9-kernel/pull/86
GPIO V2: Kernel part GPIO driver code
will move to user-space because this
part violates L4 design principle
GPIO V2: How to make thread has
authority to access AHB1_1DEV?
V1: F9 GPIO API for basic app
• Defined in user/include/gpioer.h
• gpioer_config_output
• gpioer_out
void gpioer_config_output(uint8_t port, uint8_t pin, uint8_t
pupd, uint8_t speed);
void gpioer_out(uint8_t port, uint8_t pin, uint8_t action);
V1: gpioer_config_output
void gpioer_config_output(
uint8_t port, /* Ex: GPIOA, … , GPIOD, …*/
uint8_t pin, /* 0 – 15 */
uint8_t pupd, /* GPIO_PUPDR_UP */
uint8_t speed /* GPIO_PUPDR_UP,GPIO_OSPEEDR_50M */
);
Wrap gpio_config_output from include/platform/stm32f4/gpio.h
GPIO Output Type
#define GPIO_OTYPER_PP (uint32_t (0x0) /* Output push-pull */
#define GPIO_OTYPER_OD (uint32_t)(0x1) /* Output open drain */
include/platform/stm32f4/registers.h
GPIO Speed
#define GPIO_OSPEEDR_2M (uint32_t) (0x0) /* Output speed 2MHz
*/
#define GPIO_OSPEEDR_25M (uint32_t) (0x1) /* Output speed 25MHz
*/
#define GPIO_OSPEEDR_50M (uint32_t) (0x2) /* Output speed 50MHz
*/
#define GPIO_OSPEEDR_100M(uint32_t) (0x3) /* Output speed
100MHz*/
include/platform/stm32f4/registers.h
V1: gpioer_out
void gpioer_out(uint8_t port,
uint8_t pin,
uint8_t action /* GPIO_HIGH or GPIO_LOW */
);
Wrap gpio_out_high and gpio_out_low from include/platform/stm32f4/gpio.h
Agenda
• Why we have to know GPIO?
• What’s GPIO?
– F9 GPIO API for basic app
– Code reading about F9 GPIO Hooks
• How to use GPIO?
F9
Code reading of GPIO for user part
• user/include/gpioer.h
• user/lib/io/gpioer.c
Code reading about F9 GPIO Hooks
– include/thread.h
– include/user-gpioer.h
– kernel/build.mk
– kernel/ipc.c
– kernel/user-gpioer.c
Implementation of this hook by reference the THREAD_LOG printf function
Agenda
• Why we have to know GPIO?
• What’s GPIO?
• How to use GPIO?
– First f9 GPIO app practice to control led light
– Lab3: make led blinking in turns
F9
First f9 GPIO app practice to control
led light
• PR86
– https://github.com/f9micro/f9-kernel/pull/86
• Demo
1. built-in 4 LEDs Blinking
2. trigger External LED
Live Demo 1: built-in 4 LEDs Blinking
STM32F407 Built-in 4 User LEDs
LD3 (orange)
LD4 (green)
LD5 (red)
LD6 (blue)
PD13
PD12
PD14
PD15
Live Demo 2: trigger External LED
Lab 3: LEDs blinking Rocks
Requirements
– Modify LED sample to let the led in turns
– Blinking interval 2 seconds
Hints: reference user/apps/gpioer/main.c
git clone https://github.com/benwei/f9-kernel.git
git checkout 0421-gpioer
Summary: Points recall
• GPIO is the basis of external control
• What’s implementation of GPIO api for user app
• Easy to use API for gpioer for pin output control
Discussions
?
F9
References
• F9 Microkernel source code and introduction
• GCC Naked Attribute
• ARM: Memory Model of Cortex M4
• Cortex™ -M4 Devices Generic User Guide pdf
• General-purpose Input/Output (GPIO)
• UM1472 User manual Discovery kit for STM32F407/417 lines
• STM32F4-Discovery 中文使用手冊

More Related Content

PPTX
Complete detail of arm part 5
PDF
Exor epc 0036_Spec Sheet
PDF
Aewin embedded mb8390 amd r series_mini_itx
PDF
Processor module Ax-som-cl335x reference
PDF
time and attendance in bangladesh www.unicodebd.com
PDF
Xtrem n p1960t
PDF
Aewin embedded pm6101 amd g series_pc_104
PDF
Xtrem n p1560t
Complete detail of arm part 5
Exor epc 0036_Spec Sheet
Aewin embedded mb8390 amd r series_mini_itx
Processor module Ax-som-cl335x reference
time and attendance in bangladesh www.unicodebd.com
Xtrem n p1960t
Aewin embedded pm6101 amd g series_pc_104
Xtrem n p1560t

What's hot (20)

PDF
Manual usuario - Inspur cx-h81-m1 v2 0
PDF
Pci gaming security & io card specifications and key feature
PPTX
Cisco Router EIGRP Config
PPTX
How to configure Rip version2 on a Cisco router
PPTX
Powerful Electronics with Arduino
DOCX
Pstn alarm system with lcd dispay and voice
PDF
OCP 2015 summit_honey badger_and_panther+_update
PPT
Le parti del pc - didattica differenziata
PDF
EntroWatch V1.2 (1)
DOC
Wobd2 original orange5 programming device package display
PPTX
Interfacing two wire adc0831 to raspberry pi2 / Pi3
PDF
Aewin network security appliance network management platform_scb6983
PDF
Aewin embedded mb7210 mini_itx
DOCX
Lampiran 1.programdocx
PPTX
Control processing unit and control sequence of ADD and SUB
PDF
Exor e top-epc_brochure
PDF
Handling Interrupts in Microchip MCUs
PDF
modu2 SA - Block Diagram (v20)
Manual usuario - Inspur cx-h81-m1 v2 0
Pci gaming security & io card specifications and key feature
Cisco Router EIGRP Config
How to configure Rip version2 on a Cisco router
Powerful Electronics with Arduino
Pstn alarm system with lcd dispay and voice
OCP 2015 summit_honey badger_and_panther+_update
Le parti del pc - didattica differenziata
EntroWatch V1.2 (1)
Wobd2 original orange5 programming device package display
Interfacing two wire adc0831 to raspberry pi2 / Pi3
Aewin network security appliance network management platform_scb6983
Aewin embedded mb7210 mini_itx
Lampiran 1.programdocx
Control processing unit and control sequence of ADD and SUB
Exor e top-epc_brochure
Handling Interrupts in Microchip MCUs
modu2 SA - Block Diagram (v20)
Ad

Similar to F9 microkernel app development part 2 gpio meets led (20)

PDF
Hardware interfacing basics using AVR
DOCX
Untitled 1
PPTX
Blinken' Lights with .NET
PDF
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
PPTX
Input-Output Interfacing for LED and Switch
PDF
Embedded_Systems_firstcourse_UniversitéToulouse.pdf
PPTX
pcDuino Presentation at SparkFun
PPT
Introduction to Microprocessor & Microcontroller.ppt
PPTX
Part-1 : Mastering microcontroller with embedded driver development
PDF
Ambit Brochure Embedded Robotics 2023.pdf
PDF
Ins and Outs of GPIO Programming
 
PDF
PDF
Discovering st32
PDF
Micro-controllers (PIC) based Application Development
PDF
PLEASE HELP!Modify the source code to implement the followingCh.pdf
PDF
01 GPIO||General Purpose Input Output.2016
PPTX
ESD Presenation.pptx All about embeded system
PPT
Switch & LED using TMS320C6745 DSP
PDF
Electronics_Tutorial_2022_Slide543404210s.pdf
Hardware interfacing basics using AVR
Untitled 1
Blinken' Lights with .NET
Learn How to Develop Embedded System for ARM @ 2014.12.22 JuluOSDev
Input-Output Interfacing for LED and Switch
Embedded_Systems_firstcourse_UniversitéToulouse.pdf
pcDuino Presentation at SparkFun
Introduction to Microprocessor & Microcontroller.ppt
Part-1 : Mastering microcontroller with embedded driver development
Ambit Brochure Embedded Robotics 2023.pdf
Ins and Outs of GPIO Programming
 
Discovering st32
Micro-controllers (PIC) based Application Development
PLEASE HELP!Modify the source code to implement the followingCh.pdf
01 GPIO||General Purpose Input Output.2016
ESD Presenation.pptx All about embeded system
Switch & LED using TMS320C6745 DSP
Electronics_Tutorial_2022_Slide543404210s.pdf
Ad

More from Benux Wei (9)

PDF
F9 microkernel app development part 1
PDF
F9 microkernel code reading part 4 memory management
PDF
F9 Microkernel code reading part 2 scheduling
PDF
While software engineer meets 3d printer
PDF
F9 Microkernel code reading - part 1
PDF
Real practice of Networking design on specialized for ARM Cortex-M
PDF
Tdd with python unittest for embedded c
PDF
Stm32 f4 first touch
PDF
Preparation for mit ose lab4
F9 microkernel app development part 1
F9 microkernel code reading part 4 memory management
F9 Microkernel code reading part 2 scheduling
While software engineer meets 3d printer
F9 Microkernel code reading - part 1
Real practice of Networking design on specialized for ARM Cortex-M
Tdd with python unittest for embedded c
Stm32 f4 first touch
Preparation for mit ose lab4

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PPTX
Spectroscopy.pptx food analysis technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Machine learning based COVID-19 study performance prediction
Diabetes mellitus diagnosis method based random forest with bat algorithm
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Spectroscopy.pptx food analysis technology
Per capita expenditure prediction using model stacking based on satellite ima...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
The Rise and Fall of 3GPP – Time for a Sabbatical?

F9 microkernel app development part 2 gpio meets led

  • 1. Part 2: GPIO meets LED ben6 2014-04-21 F9-Microkernel App Development
  • 2. Agenda • Why we have to know GPIO? • What’s GPIO? • How to use GPIO? F9
  • 3. Why we have to know GPIO? Basis of external hardware control GPIO (General-purpose input/output) Storage devices NICs Buttons LED …
  • 4. Agenda • Why we have to know GPIO? • What’s GPIO? – F9 GPIO API for basic app – Code reading about F9 GPIO Hooks • How to use GPIO? F9
  • 5. What’s GPIO? • GPIO -- General-purpose input/output – Generic pin on a chip whose behavior can be controlled by the user at run time – Support DMA (Direct Memory Access) control
  • 7. GPIO input • Floating: unknown voltage input stage • Pull-up: connect to high voltage • Pull-down: connected to ground • Non-analog mode: input data register (GPIO_IDR) Memory Devices gpio_input_bit(port, pin) { if (*GPIO_IDR(port) & (1 << pin)) return 1; return 0; }
  • 8. GPIO output • push-pull with pull-up/pull-down • open-drain with pull-up/pull-down • Non-analog mode, output data register (GPIO_ODR) Memory Devices *GPIO_ODR(GPIOA) |= (1 << pin);
  • 9. Agenda • Why we have to know GPIO? • What’s GPIO? – F9 GPIO API for basic app – Code reading about F9 GPIO Hooks • How to use GPIO? F9
  • 10. PR #86 GPIO V1 implementation Kernel part • include/thread.h • include/user-gpioer.h • kernel/ipc.c • kernel/user-gpioer.c App part: library and app • user/apps/gpioer/main.c • user/include/gpioer.h • user/lib/io/gpioer.c Pull request#86 https://github.com/f9micro/f9-kernel/pull/86 GPIO V2: Kernel part GPIO driver code will move to user-space because this part violates L4 design principle GPIO V2: How to make thread has authority to access AHB1_1DEV?
  • 11. V1: F9 GPIO API for basic app • Defined in user/include/gpioer.h • gpioer_config_output • gpioer_out void gpioer_config_output(uint8_t port, uint8_t pin, uint8_t pupd, uint8_t speed); void gpioer_out(uint8_t port, uint8_t pin, uint8_t action);
  • 12. V1: gpioer_config_output void gpioer_config_output( uint8_t port, /* Ex: GPIOA, … , GPIOD, …*/ uint8_t pin, /* 0 – 15 */ uint8_t pupd, /* GPIO_PUPDR_UP */ uint8_t speed /* GPIO_PUPDR_UP,GPIO_OSPEEDR_50M */ ); Wrap gpio_config_output from include/platform/stm32f4/gpio.h
  • 13. GPIO Output Type #define GPIO_OTYPER_PP (uint32_t (0x0) /* Output push-pull */ #define GPIO_OTYPER_OD (uint32_t)(0x1) /* Output open drain */ include/platform/stm32f4/registers.h
  • 14. GPIO Speed #define GPIO_OSPEEDR_2M (uint32_t) (0x0) /* Output speed 2MHz */ #define GPIO_OSPEEDR_25M (uint32_t) (0x1) /* Output speed 25MHz */ #define GPIO_OSPEEDR_50M (uint32_t) (0x2) /* Output speed 50MHz */ #define GPIO_OSPEEDR_100M(uint32_t) (0x3) /* Output speed 100MHz*/ include/platform/stm32f4/registers.h
  • 15. V1: gpioer_out void gpioer_out(uint8_t port, uint8_t pin, uint8_t action /* GPIO_HIGH or GPIO_LOW */ ); Wrap gpio_out_high and gpio_out_low from include/platform/stm32f4/gpio.h
  • 16. Agenda • Why we have to know GPIO? • What’s GPIO? – F9 GPIO API for basic app – Code reading about F9 GPIO Hooks • How to use GPIO? F9
  • 17. Code reading of GPIO for user part • user/include/gpioer.h • user/lib/io/gpioer.c
  • 18. Code reading about F9 GPIO Hooks – include/thread.h – include/user-gpioer.h – kernel/build.mk – kernel/ipc.c – kernel/user-gpioer.c Implementation of this hook by reference the THREAD_LOG printf function
  • 19. Agenda • Why we have to know GPIO? • What’s GPIO? • How to use GPIO? – First f9 GPIO app practice to control led light – Lab3: make led blinking in turns F9
  • 20. First f9 GPIO app practice to control led light • PR86 – https://github.com/f9micro/f9-kernel/pull/86 • Demo 1. built-in 4 LEDs Blinking 2. trigger External LED
  • 21. Live Demo 1: built-in 4 LEDs Blinking
  • 22. STM32F407 Built-in 4 User LEDs LD3 (orange) LD4 (green) LD5 (red) LD6 (blue) PD13 PD12 PD14 PD15
  • 23. Live Demo 2: trigger External LED
  • 24. Lab 3: LEDs blinking Rocks Requirements – Modify LED sample to let the led in turns – Blinking interval 2 seconds Hints: reference user/apps/gpioer/main.c git clone https://github.com/benwei/f9-kernel.git git checkout 0421-gpioer
  • 25. Summary: Points recall • GPIO is the basis of external control • What’s implementation of GPIO api for user app • Easy to use API for gpioer for pin output control
  • 27. References • F9 Microkernel source code and introduction • GCC Naked Attribute • ARM: Memory Model of Cortex M4 • Cortex™ -M4 Devices Generic User Guide pdf • General-purpose Input/Output (GPIO) • UM1472 User manual Discovery kit for STM32F407/417 lines • STM32F4-Discovery 中文使用手冊

Editor's Notes

  • #4: 其實日常使用設備裡都有 GPIO,小到 LED 燈號,大到各式外接設備,大多都會使用到 GPIO。通常我們program使用的data都是放在memory比較多,而GPIO也提供類似的操作方法給programmer(讓我們去更改記憶體內容就可以去控制pin,並影響周遭設備的運行),但真正的設備的位置並非真正落在記憶體上(如:LED、Button、…等),故GPIO的核心是記憶體操作與設備之間的一些電路特性。
  • #6: Typically, A GPIO port is grouped 8 GPIO pinsGPIO雖然建立起記憶體與設備之間的橋梁,但也並非我們就可以隨意使用,我們必須要經過設定之後才能讓我們想要的設備正常工作。一個pin通常可被設定成input、output、alternatefunction或analog,input會有兩種狀態表現(floating, pull-up/down),output也有兩種狀態表現(push-pull with pull-up/pull-down or open drain with pull-up/down)。input/output方向解說 : input是指記憶體方接收來自設備的訊號源,output是指記憶體傳送訊號給設備。當pin被設定成input時,非analog的設定下,我們可以利用GPIO的input data register(GPIOx_IDR) 或是memory中提供給目標設備的data register (當設成alternatefunction的時候)去接收data。當pin被設定成output時,非analog的設定下,GPIO本身有提供output data register (GPIOx_ODR)來對目標設備做控制,但要是pin不是使用原本預先定義好的功能時(非預先定義的功能都算是alternate function的類別),此時要用memory中,另外規劃給目標設備用的register。如果pin被設成analog的話,無論input or output都會由adc那邊做處理。
  • #8: floating vs. pull-up/pull-down當input pin被處在高阻抗的模式下,若沒有外部訊號源進來的話,此時是無法確定pin的狀態(不能確定現在處在高電位或低電位),除非有外部訊號來驅動電路。換句話說,input floating,這個input電位狀態完全是由外部訊號來決定,沒有訊號驅動的話,就會呈現高阻抗狀態。剛剛提到floating在沒有外部訊號驅動的情況下是呈現高阻抗狀態(無法確定電位狀態=&gt;不能明確表示現在值是0或1),如果我們需要這個pin有一個明確的預設狀態時,必須借助pull-up(pull-down)resistor來做調整,在pull-up resistor(pull-up外接高電壓,pull-down通常會接地)加入之下,讓pin的維持在明確的高電壓狀態(pull-down則是讓pin維持在低電壓狀態)。舉例來說,如果我們定電壓在3-4 V之間是1的狀態,0-1之間是0的狀態,高阻抗的時候,電壓是不明確的,有可能電壓值會落在1-3之間的不明確地帶,甚至是沒有在任何一個狀態維持一段時間,此時的狀態是未定的,但如果我們加入pull-up resistor的話,這個pin接受來自pull-up另一端的電壓供應,讓pin至少維持在3v以上時,我們就可以確定在沒有外部訊號驅動時,pin是維持在高電位狀態。
  • #9: Typically, A GPIO port is grouped 8 GPIO pinsGPIO雖然建立起記憶體與設備之間的橋梁,但也並非我們就可以隨意使用,我們必須要經過設定之後才能讓我們想要的設備正常工作。一個pin通常可被設定成input、output、alternatefunction或analog,input會有兩種狀態表現(floating, pull-up/down),output也有兩種狀態表現(push-pull with pull-up/pull-down or open drain with pull-up/down)。input/output方向解說 : input是指記憶體方接收來自設備的訊號源,output是指記憶體傳送訊號給設備。當pin被設定成input時,非analog的設定下,我們可以利用GPIO的input data register(GPIOx_IDR) 或是memory中提供給目標設備的data register (當設成alternatefunction的時候)去接收data。當pin被設定成output時,非analog的設定下,GPIO本身有提供output data register (GPIOx_ODR)來對目標設備做控制,但要是pin不是使用原本預先定義好的功能時(非預先定義的功能都算是alternate function的類別),此時要用memory中,另外規劃給目標設備用的register。如果pin被設成analog的話,無論input or output都會由adc那邊做處理。
  • #13: GPIO_OTYPER_PP
  • #14: 而push-pull输出的优势是速度快,因为线路是以两种方式驱动的。而带了上拉电阻的线路,即使以最快的速度去提升电压,最快也要一个常量的R×C的时间。其中R是电阻,C是寄生电容(parasitic capacitance),包括了pin脚的电容和板子的电容。但是,push-pull相对的缺点是往往需要消耗更多的电流,即功耗相对大。而open-drain所消耗的电流相对较小,由电阻R所限制,而R不能太小,因为当输出为低电平的时候,需要sink更低的transistor,这意味着更高的功耗。而open-drain的好处之一是,允许你short多个open-drain的电路,共用一个上拉电阻,此种做法称为wired-OR连接,此时可以通过拉低任何一个IO的pin脚使得输出为低电平。为了输出高电平,则所有的都输出高电平。此种逻辑,就是“线与”的功能,可以不需要额外的门电路来实现此部分逻辑。http://www.douban.com/note/206867792/
  • #23: 一些有預設控制元件的腳位(詳見- STM32F4-Discovery 中文使用手冊P.16)LD3:橙色,連接到STM32F407VGT6的PD13LD4:綠色,連接到STM32F407VGT6的PD12LD5:红色,連接到STM32F407VGT6的PD14LD6:藍色,連接到STM32F407VGT6的PD15B1(USER):連接到STM32F407VGT6的PA0B2(RESET):連接到NRST,用於重置STM32F407VGT6