SlideShare a Scribd company logo
1 of 16
Microprocessors systems
Vlasov Sergey
smvlasov@itmo.ru
Kirsanova Aleksandra
Memory and bus architecture
Embedded Flash memory interface
Memory organization
Relation between CPU clock frequency and Flash memory read time
Flash. Read and write operations
Reset and clock control
High speed clock source
External (HSE)
High speed clock source
Internal (HSI)
Phase-locked loop
Frequency divider
System clock (SYSCLK) selection
System clock calculation
๐‘†๐‘Œ๐‘†๐ถ๐ฟ๐พ = ๐น๐‘ƒ๐ฟ๐ฟ ๐‘”๐‘’๐‘›๐‘’๐‘Ÿ๐‘Ž๐‘™ ๐‘๐‘™๐‘œ๐‘๐‘˜ ๐‘œ๐‘ข๐‘ก๐‘๐‘ข๐‘ก
๐น๐‘ƒ๐ฟ๐ฟ ๐‘”๐‘’๐‘›๐‘’๐‘Ÿ๐‘Ž๐‘™ ๐‘๐‘™๐‘œ๐‘๐‘˜ ๐‘œ๐‘ข๐‘ก๐‘๐‘ข๐‘ก =
๐น๐‘‰๐ถ๐‘‚ ๐‘๐‘™๐‘œ๐‘๐‘˜
๐‘ƒ๐ฟ๐ฟ๐‘ƒ
๐น๐‘‰๐ถ๐‘‚ ๐‘๐‘™๐‘œ๐‘๐‘˜ = FPLL clock input ร—
๐‘ƒ๐ฟ๐ฟ๐‘
๐‘ƒ๐ฟ๐ฟ๐‘€
๐ป๐ถ๐ฟ๐พ =
๐‘†๐‘Œ๐‘†๐ถ๐ฟ๐พ
๐ด๐ป๐ต๐‘ƒ๐‘Ÿ๐‘’๐‘ ๐‘๐‘Ž๐‘™๐‘’๐‘Ÿ
๐‘ƒ๐ถ๐ฟ๐พ1 =
๐ป๐ถ๐ฟ๐พ
๐ด๐‘ƒ๐ต1๐‘ƒ๐‘Ÿ๐‘’๐‘ ๐‘๐‘Ž๐‘™๐‘’๐‘Ÿ
๐‘ƒ๐ถ๐ฟ๐พ2 =
๐ป๐ถ๐ฟ๐พ
๐ด๐‘ƒ๐ต2๐‘ƒ๐‘Ÿ๐‘’๐‘ ๐‘๐‘Ž๐‘™๐‘’๐‘Ÿ
Note.
Pay attention to frequencies limits,
listed in reference manual.
Example
Configure STM32 clock to 84 MHz from external clock generator
Algorithm:
1. Set FLASH latency.
2. Enable HSE. Check HSE Ready bit.
3. Set AHB, APB1 and APB2 prescaler.
4. Config PLL:
1. Set PLL clock source. Wait until switch operation complete.
2. Set PLL M, N and P prescalers.
3. Enable PLL. Wait PLL start.
5. Set Main clock switch to PLL source.
SysTick
//define main clock value
#define HCLK 84000000
//define System Tick Timer frequency
#define SysTicksClk 10000
//define System Tick Timer prescaler
#define SysTicks HCLK/SysTicksClk
void SysTick_Handler(void)
{
//SysTick Interrupt handler
}
int main()
{
SysTick_Config(SysTicks); //SysTick Enable and configuration
}
Thank you for attention
www.ifmo.ru

More Related Content

Similar to Lecture 2.pptx

Manual cpu clocking system
Manual cpu clocking systemManual cpu clocking system
Manual cpu clocking system
reanto vilchez
ย 
micro controllers 1.ppt
micro controllers 1.pptmicro controllers 1.ppt
micro controllers 1.ppt
siminkhan
ย 
11. Computer Systems Hardware 1
11. Computer Systems   Hardware 111. Computer Systems   Hardware 1
11. Computer Systems Hardware 1
New Era University
ย 
Describr the features of pentium microppr
Describr the features of pentium micropprDescribr the features of pentium microppr
Describr the features of pentium microppr
edwardkiwalabye1
ย 

Similar to Lecture 2.pptx (20)

Psoc3 text book
Psoc3 text book Psoc3 text book
Psoc3 text book
ย 
Processor2
Processor2Processor2
Processor2
ย 
Manual cpu clocking system
Manual cpu clocking systemManual cpu clocking system
Manual cpu clocking system
ย 
Introduction of 16-Bit Automotive Microcontrollers S12XE
Introduction of 16-Bit Automotive Microcontrollers S12XEIntroduction of 16-Bit Automotive Microcontrollers S12XE
Introduction of 16-Bit Automotive Microcontrollers S12XE
ย 
Nvidia tegra K1 Presentation
Nvidia tegra K1 PresentationNvidia tegra K1 Presentation
Nvidia tegra K1 Presentation
ย 
micro controllers 1.ppt
micro controllers 1.pptmicro controllers 1.ppt
micro controllers 1.ppt
ย 
Unit 1 processormemoryorganisation
Unit 1 processormemoryorganisationUnit 1 processormemoryorganisation
Unit 1 processormemoryorganisation
ย 
Unit 2 processor&memory-organisation
Unit 2 processor&memory-organisationUnit 2 processor&memory-organisation
Unit 2 processor&memory-organisation
ย 
Getting to Know the R8C/2A, 2B Group MCUs
Getting to Know the R8C/2A, 2B Group MCUs Getting to Know the R8C/2A, 2B Group MCUs
Getting to Know the R8C/2A, 2B Group MCUs
ย 
UNIT 2.pptx
UNIT 2.pptxUNIT 2.pptx
UNIT 2.pptx
ย 
Pll in lpc2148
Pll in lpc2148Pll in lpc2148
Pll in lpc2148
ย 
MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED pH...
MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED  pH...MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED  pH...
MIXED SIGNAL VLSI TECHNOLOGY BASED SoC DESIGN FOR TEMPERATURE COMPENSATED pH...
ย 
Introduction to Stellaris Family Microcontrollers
Introduction to Stellaris Family MicrocontrollersIntroduction to Stellaris Family Microcontrollers
Introduction to Stellaris Family Microcontrollers
ย 
11. Computer Systems Hardware 1
11. Computer Systems   Hardware 111. Computer Systems   Hardware 1
11. Computer Systems Hardware 1
ย 
Overview Study on PIC32MX3XX / 4XX 32-Bit Controller
Overview Study on PIC32MX3XX / 4XX 32-Bit ControllerOverview Study on PIC32MX3XX / 4XX 32-Bit Controller
Overview Study on PIC32MX3XX / 4XX 32-Bit Controller
ย 
COMPLETE DETAIL OF ARM PART 3
COMPLETE DETAIL OF ARM PART 3COMPLETE DETAIL OF ARM PART 3
COMPLETE DETAIL OF ARM PART 3
ย 
microcontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdfmicrocontroller 8051 17.07.2023.pdf
microcontroller 8051 17.07.2023.pdf
ย 
pic_1.pdf
pic_1.pdfpic_1.pdf
pic_1.pdf
ย 
Describr the features of pentium microppr
Describr the features of pentium micropprDescribr the features of pentium microppr
Describr the features of pentium microppr
ย 
.........
..................
.........
ย 

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 3.pptx
Lecture 3.pptxLecture 3.pptx
Lecture 3.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

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
ย 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
ย 
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
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night StandCall Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
amitlee9823
ย 

Recently uploaded (20)

Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
ย 
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 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
ย 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
ย 
(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
ย 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
ย 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
ย 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
ย 
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
ย 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ย 
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
ย 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
ย 
Top Rated Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth โŸŸ 6297143586 โŸŸ Call Me For Genuine Se...
ย 
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
ย 
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
ย 
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar  โ‰ผ๐Ÿ” Delhi door step de...
Call Now โ‰ฝ 9953056974 โ‰ผ๐Ÿ” Call Girls In New Ashok Nagar โ‰ผ๐Ÿ” Delhi door step de...
ย 
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...
ย 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
ย 
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
ย 
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night StandCall Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
ย 

Lecture 2.pptx

  • 2. Memory and bus architecture
  • 5. Relation between CPU clock frequency and Flash memory read time
  • 6. Flash. Read and write operations
  • 7. Reset and clock control
  • 8. High speed clock source External (HSE)
  • 9. High speed clock source Internal (HSI)
  • 13. System clock calculation ๐‘†๐‘Œ๐‘†๐ถ๐ฟ๐พ = ๐น๐‘ƒ๐ฟ๐ฟ ๐‘”๐‘’๐‘›๐‘’๐‘Ÿ๐‘Ž๐‘™ ๐‘๐‘™๐‘œ๐‘๐‘˜ ๐‘œ๐‘ข๐‘ก๐‘๐‘ข๐‘ก ๐น๐‘ƒ๐ฟ๐ฟ ๐‘”๐‘’๐‘›๐‘’๐‘Ÿ๐‘Ž๐‘™ ๐‘๐‘™๐‘œ๐‘๐‘˜ ๐‘œ๐‘ข๐‘ก๐‘๐‘ข๐‘ก = ๐น๐‘‰๐ถ๐‘‚ ๐‘๐‘™๐‘œ๐‘๐‘˜ ๐‘ƒ๐ฟ๐ฟ๐‘ƒ ๐น๐‘‰๐ถ๐‘‚ ๐‘๐‘™๐‘œ๐‘๐‘˜ = FPLL clock input ร— ๐‘ƒ๐ฟ๐ฟ๐‘ ๐‘ƒ๐ฟ๐ฟ๐‘€ ๐ป๐ถ๐ฟ๐พ = ๐‘†๐‘Œ๐‘†๐ถ๐ฟ๐พ ๐ด๐ป๐ต๐‘ƒ๐‘Ÿ๐‘’๐‘ ๐‘๐‘Ž๐‘™๐‘’๐‘Ÿ ๐‘ƒ๐ถ๐ฟ๐พ1 = ๐ป๐ถ๐ฟ๐พ ๐ด๐‘ƒ๐ต1๐‘ƒ๐‘Ÿ๐‘’๐‘ ๐‘๐‘Ž๐‘™๐‘’๐‘Ÿ ๐‘ƒ๐ถ๐ฟ๐พ2 = ๐ป๐ถ๐ฟ๐พ ๐ด๐‘ƒ๐ต2๐‘ƒ๐‘Ÿ๐‘’๐‘ ๐‘๐‘Ž๐‘™๐‘’๐‘Ÿ Note. Pay attention to frequencies limits, listed in reference manual.
  • 14. Example Configure STM32 clock to 84 MHz from external clock generator Algorithm: 1. Set FLASH latency. 2. Enable HSE. Check HSE Ready bit. 3. Set AHB, APB1 and APB2 prescaler. 4. Config PLL: 1. Set PLL clock source. Wait until switch operation complete. 2. Set PLL M, N and P prescalers. 3. Enable PLL. Wait PLL start. 5. Set Main clock switch to PLL source.
  • 15. SysTick //define main clock value #define HCLK 84000000 //define System Tick Timer frequency #define SysTicksClk 10000 //define System Tick Timer prescaler #define SysTicks HCLK/SysTicksClk void SysTick_Handler(void) { //SysTick Interrupt handler } int main() { SysTick_Config(SysTicks); //SysTick Enable and configuration }
  • 16. Thank you for attention www.ifmo.ru