Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Trying to replace bootloader on Itsybitsy m4
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trying to replace bootloader on Itsybitsy m4

by ahrensd on Fri Jul 31, 2020 2:46 am

Having lots of difficulty with a itsybitsy which has appeared to have died?
Any way of completely doing a factory reset?

Have hooked up the board to Atmel Studio 7 and checked the fuses. Which originally did look like this!

SW0_WORD_0 = 0x1FF07FD (valid)
SW0_WORD_1 = 0x1B29 (valid)
TEMP_LOG_WORD_0 = 0xFE06981D (valid)
TEMP_LOG_WORD_1 = 0xD45AB0FF (valid)
TEMP_LOG_WORD_2 = 0xFF954B65 (valid)
USER_WORD_0 = 0xF7FFFFFF (valid)
USER_WORD_1 = 0xFFFFFFFF (valid)
USER_WORD_2 = 0xFFFFFFFF (valid)

Managed to check against another board and changed them to

SW0_WORD_0 = 0x1FF07FD (valid)
SW0_WORD_1 = 0x1B29 (valid)
TEMP_LOG_WORD_0 = 0xFF96801E (valid)
TEMP_LOG_WORD_1 = 0xD2DAA700 (valid)
TEMP_LOG_WORD_2 = 0xFF94AB57 (valid)
USER_WORD_0 = 0xFE9A9239 (valid)
USER_WORD_1 = 0xAEECFF80 (valid)
USER_WORD_2 = 0xFFFFFFFF (valid)

Then tried to flash memories with latest bootloader v3.10.0 .bin file
and got error: Verifying Flash...Failed! address=0x0000 expected=0xa0 actual=0xff

No light is on the board.

Also tried jlink with the follow outcome

J-Link>loadbin "C:\bootloaders\itsybitsyM4\bootloader-itsybitsy_m4-v3.10.0.bin", 0x00000000
Downloading file [C:\bootloaders\itsybitsyM4\bootloader-itsybitsy_m4-v3.10.0.bin]...

****** Error: Verification of RAMCode failed @ address 0x200003B4.
Write: 0x7FFFFFFF 2401B538
Read: 0xFFFFFFFF 2401B538
Failed to prepare for programming.
Failed to download RAMCode!
Unspecified error -1
J-Link>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.

also checked the user pages with j-link and got different results

for good board
J-Link>mem 0x00804000, 512
00804000 = 39 92 9A F6 80 FF EC AE FF FF FF FF FF FF FF FF 9...............
00804010 = 10 40 80 00 FF FF FF FF FF FF FF FF FF FF FF FF .@..............
00804020 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804030 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804040 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804050 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804060 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804070 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804080 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804090 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040A0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040B0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040C0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040D0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040E0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040F0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804100 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804110 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804120 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804130 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804140 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804150 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804160 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804170 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804180 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804190 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041A0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041B0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041C0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041D0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041E0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041F0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804200 = A3 B9 2C 1D 17 B0 BD E8 5A 2B 2F D8 AB 78 E4 B2 ..,.....Z+/..x..
00804210 = A3 B9 2C 1D 00 B9 70 BD AB 78 51 01 46 B1 29 1D ..,...p..xQ.F.).
00804220 = 70 B5 05 46 EF 69 26 F0 52 D0 1D 46 44 06 00 20 p..F.i&.R..FD..
00804230 = 2B 60 FF F7 02 EB 02 13 D5 E9 14 49 01 EB 08 00 +`.........I....
00804240 = FC FF 02 20 81 FF 28 6D AB 78 51 01 6B 78 28 78 ... ..(m.xQ.kx(x
00804250 = A3 B9 2C 1D 24 80 00 2B 52 D0 1D 46 53 BC 00 BF ..,.$..+R..FS...
00804260 = D9 E7 00 BF 2D E9 F0 43 00 24 C8 F8 15 F0 08 05 ....-..C.$......
00804270 = 0F 46 D4 F8 00 20 F8 BD 01 31 40 F2 70 BD 29 46 .F... ...1@.p.)F
00804280 = A3 B9 2C 1D 00 20 FE F7 0B 4A 13 68 01 EB 08 00 ..,.. ...J.h....
00804290 = 05 46 FF F7 81 FF 50 B3 32 D4 D0 4B 00 20 01 21 .F....P.2..K. .!
008042A0 = 83 F8 47 20 C6 F8 00 B0 B9 BF 00 BF 6B 78 28 78 ..G ........kx(x
008042B0 = 90 F8 47 20 DB FF 00 BF 29 FD 00 B9 0D 04 44 60 ..G ....).....D`
008042C0 = 90 F8 47 20 02 EB 02 13 AB 78 51 01 4C 20 A5 F8 ..G .....xQ.L ..
008042D0 = 05 46 FF F7 1A 46 FF F7 06 46 0A 46 04 46 FF F7 .F...F...F.F.F..
008042E0 = 99 F8 07 41 6A 60 00 22 FF F7 62 FF AB 78 E4 B2 ...Aj`."..b..x..
008042F0 = 08 4D 01 92 A6 68 AE 60 44 68 63 F3 05 4B 07 22 .M...h.`Dhc..K."
00804300 = 0F 46 D4 F8 01 68 2C 68 D5 E9 14 49 84 B0 00 F0 .F...h,h...I....
00804310 = 4F F0 82 44 81 FF 50 B3 AB 6C B5 F8 01 F0 BE FA O..D..P..l......
00804320 = 20 46 03 B0 00 20 F8 BD 52 D0 1D 46 70 BD 29 46 F... ..R..Fp.)F
00804330 = 89 05 00 00 00 20 FE F7 89 F8 00 30 0B 60 3A B1 ..... .....0.`:.
00804340 = 0F 46 D4 F8 00 20 F8 BD 02 68 01 33 70 BD 29 46 .F... ...h.3p.)F
00804350 = A3 B9 2C 1D 1C 48 0B 68 0B 4A 13 68 01 EB 08 00 ..,..H.h.J.h....
00804360 = A2 F5 7A 71 81 FF 50 B3 09 FE 5E E6 15 4C A2 F1 ..zq..P...^..L..
00804370 = 83 F8 47 20 BD E8 F0 83 D4 03 00 20 DF E8 03 F0 ..G ....... ....
00804380 = 99 F8 07 41 20 70 02 44 2B 46 22 46 46 B1 29 1D ...A p.D+F"FF.).
00804390 = E4 D1 0B 4B 0E 46 FF F7 0B 4A 13 68 30 BC 70 47 ...K.F...J.h0.pG
008043A0 = 87 FD 9F E7 01 68 2C 68 11 D1 15 48 4C 20 A5 F8 .....h,h...HL ..
008043B0 = 01 9A A3 E7 BD E8 F0 83 2D E9 F0 41 6B 78 28 78 ........-..Akx(x
008043C0 = 18 BF 01 20 00 F0 AC B8 DA D0 44 68 83 B0 06 46 ... ......Dh...F
008043D0 = 30 B4 1C 49 11 25 A0 83 52 D0 1D 46 01 00 00 20 0..I.%..R..F...
008043E0 = 00 40 18 B9 0D 46 FF F7 02 68 01 33 26 79 00 27 .@...F...h.3&y.'
008043F0 = 0A 48 0B 4D 8B 42 25 D0 44 68 63 F3 83 B0 06 46 .H.M.B%.Dhc....F
00804400 = F4 E7 00 BF 41 F8 08 40 0D FE D8 B1 15 4C A2 F1 ....A..@.....L..
00804410 = 18 BF 01 20 00 B9 70 BD 5A 61 DF E7 01 EB 08 00 ... ..p.Za......
00804420 = 40 21 A8 48 8B 42 25 D0 DA D0 44 68 6B 78 28 78 @!.H.B%...Dhkx(x
00804430 = 16 49 13 F0 C4 1A BC 42 70 22 00 00 13 60 70 47 .I.....Bp"...`pG
00804440 = 01 9A A3 E7 8B FB E6 E7 28 BF 3C 46 15 F0 08 05 ........(.<F....
00804450 = 05 46 FF F7 02 EB 02 13 D8 03 00 20 AB 78 E4 B2 .F......... .x..
00804460 = 90 F8 47 20 74 07 00 20 09 FE 5E E6 30 46 1F 21 ..G t.. ..^.0F.!
00804470 = 3F 3C FE F7 41 F8 08 40 00 24 C8 F8 DF E8 03 F0 ?<..A..@.$......
00804480 = 99 F8 07 41 02 EB 02 13 5A 2B 2F D8 0D 04 44 60 ...A....Z+/...D`
00804490 = 3F 3C FE F7 24 80 00 2B 01 31 40 F2 04 46 FF F7 ?<..$..+.1@..F..
008044A0 = 85 FB 20 46 DB FF 00 BF D5 E9 14 49 65 D2 BD E8 .. F.......Ie...
008044B0 = 0F 46 D4 F8 41 F8 08 40 3F 08 3F 2C 6B 78 28 78 .F..A..@?.?,kx(x
008044C0 = 20 46 00 23 14 F0 01 04 0D FE D8 B1 FF F7 0C FF F.#............
008044D0 = 80 22 40 21 24 80 00 2B 3F 08 3F 2C FE F7 F4 FD ."@!$..+?.?,....
008044E0 = 87 FD 9F E7 DB FF 00 BF B0 F5 80 4F 4C 20 A5 F8 ...........OL ..
008044F0 = 01 9A A3 E7 41 F8 08 40 3F 08 3F 2C 6B 78 28 78 ....A..@?.?,kx(x
00804500 = 20 46 00 23 14 F0 01 04 0D FE D8 B1 FF F7 0C FF F.#............
00804510 = F0 87

for bad board

J-Link>mem 0x00804000, 512
00804000 = 39 92 9A FE 80 FF EC AE FF FF FF FF FF FF FF FF 9...............
00804010 = 10 40 80 00 FF FF FF FF FF FF FF FF FF FF FF FF .@..............
00804020 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804030 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804040 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804050 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804060 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804070 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804080 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804090 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040A0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040B0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040C0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040D0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040E0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008040F0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804100 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804110 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804120 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804130 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804140 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804150 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804160 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804170 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804180 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804190 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041A0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041B0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041C0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041D0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041E0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008041F0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804200 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804210 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804220 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804230 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804240 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804250 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804260 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804270 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804280 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804290 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008042A0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008042B0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008042C0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008042D0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008042E0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008042F0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804300 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804310 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804320 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804330 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804340 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804350 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804360 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804370 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804380 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804390 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008043A0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008043B0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008043C0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008043D0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008043E0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008043F0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804400 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804410 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804420 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804430 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804440 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804450 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804460 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804470 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804480 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804490 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008044A0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008044B0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008044C0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008044D0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008044E0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
008044F0 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804500 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00804510 = FF FF ..

also tried
J-Link>w4 0x00804200 0xA3B92C1D
Writing A3B92C1D -> 00804200
on bad board and found nothing changed
J-Link>mem 0x00804200, 8
00804200 = FF FF FF FF FF FF FF FF ........ ..

ahrensd
 
Posts: 22
Joined: Sat Nov 12, 2016 6:58 pm

Re: Trying to replace bootloader on Itsybitsy m4

by mikeysklar on Fri Jul 31, 2020 12:51 pm

Are you getting a red NeoPixel LED on your ItsyBitsy M4?

If the bootloader couldn't start, you will get a red NeoPixel LED.



I assume the mass storage device does not show up on your system?

Have you tried using bossac to reflash the board? You would need a device showing up when connected.

# Example from Feather M4 Express
Code: Select all | TOGGLE FULL SIZE
bossac -p=/dev/cu.usbmodem14301 -e -w -v -R --offset=0x4000 adafruit-circuitpython-feather_m4_express-3.0.0.bin


https://learn.adafruit.com/introducing- ... er-details

mikeysklar
 
Posts: 1655
Joined: Mon Aug 01, 2016 8:10 pm

Re: Trying to replace bootloader on Itsybitsy m4

by ahrensd on Fri Jul 31, 2020 5:34 pm

Neither LEDs come on. and no COM port shows up on the computer..
Pressing reset does nothing.

ahrensd
 
Posts: 22
Joined: Sat Nov 12, 2016 6:58 pm

Please be positive and constructive with your questions and comments.