Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

50%
+0 −0
Q&A How come the registers in a micro are application specific?

They aren't specific to the project, but to the MCU. As long as you use the same MCU for multiple projects, they will be code compatible. Some hardware peripherals are even code compatible between ...

posted 3y ago by Lundin‭  ·  edited 3y ago by Lundin‭

Answer
#2: Post edited by user avatar Lundin‭ · 2020-08-28T13:48:46Z (over 3 years ago)
  • They aren't specific to the project, but to the MCU. As long as you use the same MCU for multiple projects, they will be code compatible. Some hardware peripherals are even code compatible between different MCU families by the same manufacturer.
  • Generally, they are different in each and every MCU because:
  • - No standardization exists. Each company design their hardware as they like, with no consensus or standardization. (Or rationale, for that matter...)
  • - Different hardware requires different registers. And a newer version of the hardware by the same manufacturer is not necessarily backwards-compatible.
  • Take a timer hardware peripheral as one example: there's so many different features that such hardware could have, from case to case. Input capture, synchronized outputs, PWM abilities, external triggers, down counters, different resolution, numerous different clock sources etc etc.
  • - Marketing reasons. Different manufacturers compete by providing the best peripherals. This is especially true since ARM Cortex became industry de-facto standard - those who make ARM CPUs can no longer compete over having the best core, so having the best hardware peripherals have become more important.
  • - Core data bandwidth. It makes sense to provide 8 bit registers for a 8 bit MCU, but for a 32 bit MCU it might be more convenient to make them 32 bit. So the register width could be changed for this purpose, no matter what the underlying hardware actually requires.
  • They aren't specific to the project, but to the MCU. As long as you use the same MCU for multiple projects, they will be code compatible. Some hardware peripherals are even code compatible between different MCU families by the same manufacturer.
  • Generally, registers are different in each and every MCU because:
  • - No standardization exists. Each company design their hardware as they like, with no consensus or standardization. (Or rationale, for that matter...)
  • - Different hardware requires different registers. And a newer version of the hardware by the same manufacturer is not necessarily backwards-compatible.
  • Take a timer hardware peripheral as one example: there's so many different features that such hardware could have, from case to case. Input capture, synchronized outputs, PWM abilities, external triggers, down counters, different resolution, numerous different clock sources etc etc.
  • - Marketing reasons. Different manufacturers compete by providing the best peripherals. This is especially true since ARM Cortex became industry de-facto standard - those who make ARM CPUs can no longer compete over having the best core, so having the best hardware peripherals have become more important.
  • - Core data bandwidth. It makes sense to provide 8 bit registers for a 8 bit MCU, but for a 32 bit MCU it might be more convenient to make them 32 bit. So the register width could be changed for this purpose, no matter what the underlying hardware actually requires.
#1: Initial revision by user avatar Lundin‭ · 2020-08-28T13:48:13Z (over 3 years ago)
They aren't specific to the project, but to the MCU. As long as you use the same MCU for multiple projects, they will be code compatible. Some hardware peripherals are even code compatible between different MCU families by the same manufacturer.

Generally, they are different in each and every MCU because:

- No standardization exists. Each company design their hardware as they like, with no consensus or standardization. (Or rationale, for that matter...)
- Different hardware requires different registers. And a newer version of the hardware by the same manufacturer is not necessarily backwards-compatible.

  Take a timer hardware peripheral as one example: there's so many different features that such hardware could have, from case to case. Input capture, synchronized outputs, PWM abilities, external triggers, down counters, different resolution, numerous different clock sources etc etc.

- Marketing reasons. Different manufacturers compete by providing the best peripherals. This is especially true since ARM Cortex became industry de-facto standard - those who make ARM CPUs can no longer compete over having the best core, so having the best hardware peripherals have become more important.

- Core data bandwidth. It makes sense to provide 8 bit registers for a 8 bit MCU, but for a 32 bit MCU it might be more convenient to make them 32 bit. So the register width could be changed for this purpose, no matter what the underlying hardware actually requires.