It has come to my attention that some ARM programmers set some CPU registers with values that are the same default values of the register on microcontroller reset.
For example: the default value of IOCON_PIO2_9
, parameter MODE
on LCP1114 is 0x02 (pull-up resistor enabled). In Olimex's example code this value is set to 0x02
in software initialization but this is already the default value.
This behavior occurs with many other registers.
Why would someone do that? In my opinion, this extra code just pollutes everything and make code readability worse. Is this a good programming practice?