If you write random numbers to a microcomputer, will it continue to run?

Asked 2 years ago, Updated 2 years ago, 28 views

I can't program, but I'm sorry for the sf-like question.

If I write random numbers in the ROM and RAM of my microcomputer, will it continue to run?Or do you want to stop?

If it continues to run and you connect it in serial or parallel using a microcomputer with two random numbers written on it, would you like to start an orderly communication?

c

2022-09-29 22:31

1 Answers

If the starting point of the agenda is a random value, the following is all about probability theory.
"If you don't exclude the very low probability, it's ""anything."""
The following is a very high probability.

Example of the most likely scenario
A random value means that it contains an incorrect value as an instruction for the microcomputer.
Is the instruction assigned to all bit strings
Therefore, microcomputer hardware will issue an undefined command exception.
An undefined instruction exception handler will contain undefined instructions and will loop indefinitely.
This is internally equivalent to continuing to run without stopping.

Examples of possible scenarios
If the instruction value happens to match a stop instruction called HALT or SLEEP,
The microcomputer enters power saving mode and "stops".

because initialization may not have been done properly to restore normal operation from power saving mode. There is no other way but to reset, so it will continue to stop.

In reality, it seems that one of the above two actions is possible.

Do you want to start an orderly communication?

These days, microcomputers have a lot of protection so that they don't happen to be in that situation.
It's so fulfilling that it takes a lot of trouble to move it properly.
·After reset, the serial communication function peripheral circuit is in power saving mode and does not work
·After reset, the peripheral circuit function of the microcomputer pin is disabled
·Programmers can consciously remove the "protection function" and activate the function
·You need to consciously combine specific instructions to operate "disengage protection"
·Multiple protection functions are often provided
 (Power saving and feature allocation are protected by separate protective mechanisms)

You don't have to worry about it because it's groundless.

Well, Oira, I've encountered a lot of things that wouldn't happen in a normal way, but with NDA.


2022-09-29 22:31

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.