Skip to main content

AVR Lock and Fuse bits

์„ค์ •๋˜์–ด ์žˆ๋Š” ๋น„ํŠธ๊ฐ€ ์–ด๋–ค ์ƒํƒœ์ธ์ง€ ์•Œ๊ธฐ ์œ„ํ•ด์„œ ์•„๋ž˜์™€ ๊ฐ™์ด avrdude ์ปค๋งจ๋“œ๋ฅผ ์ž…๋ ฅํ•ด์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

avrdude -p<partno> -c<programmer-id> -U efuse:r:-:b -U hfuse:r:-:b -U lfuse:r:-:b -U lock:r:-:b

Lock bits#

Lock bits๋Š” ํ”„๋กœ๊ทธ๋ž˜๋จธ๋ฅผ ํ†ตํ•ด ๋ฉ”๋ชจ๋ฆฌ์— ์ ‘๊ทผํ•˜๋Š” ๊ฒƒ์„ ๋ณดํ˜ธํ•˜๋Š” ์„ค์ •์— ๋Œ€ํ•œ ๋น„ํŠธ์ž…๋‹ˆ๋‹ค.

Lock bits์— 0 ์“ฐ๋Š” ๊ฒƒ์€ ์ž์œ ๋กญ์ง€๋งŒ 1 ์„ ์“ฐ๊ธฐ ์œ„ํ•ด์„œ๋Š” ์นฉ์„ ์ง€์›Œ์•ผ ํ•ฉ๋‹ˆ๋‹ค.

-e ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜๋ฉด flash ROM, EEPROM, Lock bits๋ฅผ ๋ชจ๋‘ 0xFF๋กœ ์ดˆ๊ธฐํ™” ์‹œํ‚ต๋‹ˆ๋‹ค. flash์— ํ”„๋กœ๊ทธ๋žจ์„ ์—…๋กœ๋“œํ•˜๋ฉด ์ž๋™์œผ๋กœ -e ์˜ต์…˜์ด ์ ์šฉ๋˜๊ธฐ ๋•Œ๋ฌธ์— Lock bits๋Š” ์—…๋กœ๋“œ ํ›„์— ํ•ญ์ƒ 0xFF๋กœ ์ดˆ๊ธฐํ™” ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

๊ทธ๋Ÿฌ๋ฏ€๋กœ ํ”„๋กœ๊ทธ๋žจ์„ ์—…๋กœ๋“œ ํ•˜๊ธฐ ์ „์— -e ์˜ต์…˜์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ•์ œ์ ์œผ๋กœ Lock bits๋ฅผ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์€ ๋ฌด์˜๋ฏธ ํ•ฉ๋‹ˆ๋‹ค.

avrdude -p<partno> -c<programmer-id> -U efuse:w:[0bxxxxxxxx]:m

Fuse bits#

Fuse bits๋Š” Extended, High, Low ์„ธ ์ข…๋ฅ˜๋กœ ํ”„๋กœ๊ทธ๋ž˜๋จธ, ๋ถ€ํŠธ ์‚ฌ์ด์ฆˆ, ํด๋Ÿญ ์†Œ์Šค ๋“ฑ์˜ ์„ค์ •์— ๋Œ€ํ•œ ๋น„ํŠธ์ž…๋‹ˆ๋‹ค.

๊ธฐ๋Šฅ์— ํ•ด๋‹นํ•˜๋Š” ๋น„ํŠธ๋ฅผ 0 ์œผ๋กœ ์„ค์ •ํ•˜๋ฉด ํ™œ์„ฑํ™”๋˜๊ณ  1 ๋กœ ์„ค์ •ํ•˜๋ฉด ๋น„ํ™œ์„ฑํ™” ๋ฉ๋‹ˆ๋‹ค.

Extended Fuse bits#

avrdude -p<partno> -c<programmer-id> -U efuse:w:[0bxxxxxxxx]:m

Fuse High bits#

avrdude -p<partno> -c<programmer-id> -U hfuse:w:[0bxxxxxxxx]:m

Fuse Low bits#

avrdude -p<partno> -c<programmer-id> -U lfuse:w:[0bxxxxxxxx]:m
Last updated on