SlideShare a Scribd company logo
1 of 19
Microprocessors systems
Vlasov Sergey
smvlasov@itmo.ru
Kirsanova Aleksandra
Universal asynchronous receiver-transmitter
Protocol
Operation
STM32F401 UART
STM32F401 UART
USART character description
Transmitter
Receiver
Fractional baud rate generation
Example:
• BAUDRATE = 19200
• APBx_FREQ = 42000000
//define APBx frequency
#define APBx_FREQ 42000000
//define UART Baudrate
#define BAUDRATE 19200
//In main function set UART baudrate
USARTx->BRR = APBx_FREQ/BAUDRATE
Interrupt
Nested Vector Interrupt Controller
Nested Vector Interrupt Controller
Nested Vector Interrupt Controller
Nested Vector Interrupt Controller
Nested Vector Interrupt Controller
Nested Vector Interrupt Controller
Enabling Interrupt
//Create USART2 Interrupt Handler
void USART2_IRQHandler(void)
{
//Some actions
}
int main()
{ RCC->APB1ENR |= RCC_APB1ENR_USART2EN;
USART2->BRR = APB1/USART_BAUDRATE;
USART2->CR1 = USART_CR1_UE | //Enable UART
USART_CR1_TE | //Enable Transmitter
USART_CR1_RE | //Enable Receiver
USART_CR1_RXNEIE; //Enable interrupt in peripheral
NVIC_EnableIRQ(USART2_IRQn); //Enable Global interrupt
}
Thank you for attention
www.ifmo.ru

More Related Content

Similar to Lecture 3.pptx

ECE 24 Final Report 052209
ECE 24 Final Report 052209ECE 24 Final Report 052209
ECE 24 Final Report 052209
crh342
 
Llpc2148 sci
Llpc2148 sciLlpc2148 sci
Llpc2148 sci
anishgoel
 
Design procedures of bipolar low noise amplifier at radio frequency using s p...
Design procedures of bipolar low noise amplifier at radio frequency using s p...Design procedures of bipolar low noise amplifier at radio frequency using s p...
Design procedures of bipolar low noise amplifier at radio frequency using s p...
mohamed albanna
 
Design procedures of bipolar low noise amplifier at radio frequency using s p...
Design procedures of bipolar low noise amplifier at radio frequency using s p...Design procedures of bipolar low noise amplifier at radio frequency using s p...
Design procedures of bipolar low noise amplifier at radio frequency using s p...
mohamed albanna
 

Similar to Lecture 3.pptx (20)

Imx53 uart- GUIDE BOOK
Imx53 uart- GUIDE BOOKImx53 uart- GUIDE BOOK
Imx53 uart- GUIDE BOOK
 
Datasheet bq33200
Datasheet bq33200Datasheet bq33200
Datasheet bq33200
 
Max2837 hackrf
Max2837 hackrfMax2837 hackrf
Max2837 hackrf
 
Cataloge ge 3.control and_automation-27_vat300_e_c7_rev_c
Cataloge ge 3.control and_automation-27_vat300_e_c7_rev_cCataloge ge 3.control and_automation-27_vat300_e_c7_rev_c
Cataloge ge 3.control and_automation-27_vat300_e_c7_rev_c
 
MC3PHAC.pdf
MC3PHAC.pdfMC3PHAC.pdf
MC3PHAC.pdf
 
ECE 24 Final Report 052209
ECE 24 Final Report 052209ECE 24 Final Report 052209
ECE 24 Final Report 052209
 
8259
8259 8259
8259
 
Llpc2148 sci
Llpc2148 sciLlpc2148 sci
Llpc2148 sci
 
EGmicro EG8010 Datasheet
EGmicro EG8010 DatasheetEGmicro EG8010 Datasheet
EGmicro EG8010 Datasheet
 
Xxs
XxsXxs
Xxs
 
PVI-10
PVI-10PVI-10
PVI-10
 
Msp430g2453
Msp430g2453Msp430g2453
Msp430g2453
 
Microcontroller part 2
Microcontroller part 2Microcontroller part 2
Microcontroller part 2
 
Design procedures of bipolar low noise amplifier at radio frequency using s p...
Design procedures of bipolar low noise amplifier at radio frequency using s p...Design procedures of bipolar low noise amplifier at radio frequency using s p...
Design procedures of bipolar low noise amplifier at radio frequency using s p...
 
Design procedures of bipolar low noise amplifier at radio frequency using s p...
Design procedures of bipolar low noise amplifier at radio frequency using s p...Design procedures of bipolar low noise amplifier at radio frequency using s p...
Design procedures of bipolar low noise amplifier at radio frequency using s p...
 
2005 z inglês
2005 z inglês2005 z inglês
2005 z inglês
 
Kannad 406 af compact
Kannad 406 af compactKannad 406 af compact
Kannad 406 af compact
 
A4988
A4988A4988
A4988
 
tsx561
tsx561tsx561
tsx561
 
BlueOptics Bo66 jxx640d t2 10gbase cwdm xfp transceiver 1471nm 1611nm 40 km s...
BlueOptics Bo66 jxx640d t2 10gbase cwdm xfp transceiver 1471nm 1611nm 40 km s...BlueOptics Bo66 jxx640d t2 10gbase cwdm xfp transceiver 1471nm 1611nm 40 km s...
BlueOptics Bo66 jxx640d t2 10gbase cwdm xfp transceiver 1471nm 1611nm 40 km s...
 

More from GautamDhargalkar1 (7)

Lecture 6.pptx
Lecture 6.pptxLecture 6.pptx
Lecture 6.pptx
 
Lecture 5.pptx
Lecture 5.pptxLecture 5.pptx
Lecture 5.pptx
 
Lecture 4.pptx
Lecture 4.pptxLecture 4.pptx
Lecture 4.pptx
 
Lecture 2.pptx
Lecture 2.pptxLecture 2.pptx
Lecture 2.pptx
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Indian_Flag_Template.potx
Indian_Flag_Template.potxIndian_Flag_Template.potx
Indian_Flag_Template.potx
 
Typical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.ppt
Typical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.pptTypical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.ppt
Typical_Techniques_for_Eliminating_Physical_Contradictions-Needs corrections.ppt
 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Recently uploaded (20)

chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 

Lecture 3.pptx