ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Среда
17 июля
300186 Топик полностью
Stri (18.01.2012 14:57, просмотров: 122) ответил mazur на Небольшой вопросик. Есть какой-то девайс. Унутри микроконтроллер. И вот, работает девайс год, два, без выключения. И где-то в ОЗУ все это время болтается значение. Обновлять периодически это значение или не нужно?
Буквально вчера наткнулся про подобную проблему в одной книге. Пишут, таки реально залётные кванты вредят: Some embedded applications are designed to run their main loops for months or years in a row without ever being turned off or receiving a reset command. But the control registers of a microcontroller are simple RAM memory cells. The probability that a power supply fluctuation (un-detected by the brown-out reset circuit), an electromagnetic pulse emitted by some noisy equipment in the proximity, or even a cosmic ray could alter their contents is a small but finite number. Given enough time (years) and depending on the application, you might see it happen. When you design applications that have to operate reliably on huge time scales, you should start seriously considering the need to provide a periodic “ refresh ” of the most important control registers of the essential peripherals used by the application. Group the sequence of initialization instructions in one or more functions. Call the functions once at power-up, before entering the main loop, but also make sure that inside the main loop the initialization functions are called when idling and no other critical task is pending, so that every control register is reinitialized periodically. (c)Programming 32-bit. Microcontrollers in C. Exploring the PIC32. Lucio Di Jasio