dousha99 发表于 2015-10-26 13:16:07

critor: plz help, got stuck on boot2 flashing. 在给大黄刷boot2的时候遇到问题

English is not my native language, so, sorry for those grammatical or spelling errors.

Well, I upgraded my nspire (non CAS) by accident. Now my boot2 is 3.01.131. Since downgradefix doesn't support touchpad model, I decided to use USB-TTL method to downgrade boot2.

And here's situation, I have no USB-TTL board but an Arduino UNO R3, so I used that Arduino (RESET connects to GND, 0 as RX, 1 as TX, reverse them if you don't have signal). I got some information on screen but when I try to send boot2.img, it doesn't work. Screen reads `Retry 0: NAK on sector`. It retries about 10 times and gives up.

I've made sure there's nothing wrong with my connection wires and calculator itself. Maybe I should buy one USB-TTL converter? Or there's something wrong with my operation progress (which are shown below)? Any help would be appreciated. Thanks in advance. :)

The full verbose operation progress are shown below.

1. Arduino hook up (USB connector is on the top, reset button is on the right up corner.)
On the left side, RESET pin is connected with one of the GND pin. This makes it become a serial port converter.
On the right side, pin 0, 1 and GND are used as serial port.

2. Nspire hook up (filp nspire, screen now faces to the ground, dock port is at the bottom towards you)
From the LEFT hand
Pin 3 - TX
Pin 4 - RX
(I'm not clear if this is correct. If there's nothing on screen, swap pin 3 and pin 4)
Pin 5 (longer) - GND

3. System configuration
Connect Arduino to computer, open terminal, `su -` (I'm using openSUSE 13.2), run following commands
`stty -F /dev/ttyACM0 115200 -evenp -cstopb` # this sets up serial port
`cat /dev/ttyACM0` # this shows serial port information
# then create a new tab in terminal, or just fork the last command
`sz -X boot2.img <> /dev/ttyACM0 >&0; cat /dev/ttyACM0` # this sends the file
# at this time, boot2 would be download to the target device
# then I got error here. So sad :(

critor 发表于 2015-10-27 01:34:48

Hi,


Just some general notes, as I've never tried with your hardware :
- check your contacts on the TI-Nspire side, especially for short circuits between TX and RX, or between TX/RX and adjacent contacts
- did you put your calculator into Boot2 receive mode with the appropriaté key combo ?

dousha99 发表于 2015-10-27 14:01:49

Thanks for your reply.
I've checked connection twice and found no error. Since I can recieve information from the calculator, I assume that the connection is fine. And I also have tried to short the circuit. If I connect TX/RX to GND, it fails in an instant. If I TX and RX are shorten, it fails too.
I googled that error, and this post suggested me drop baud rate from 115200 to 57600. I tried but has no result, neither (of course). But then I read wikipedia, it says <NAK> means that receiver got an bad package, or there's nothing sent in 10 seconds. I get <NAK> every 10 seconds, does that means I really didn't send anything, or I connected TX with a wrong pin?
Maybe I should get a USB-TTL converter instead of using Arduino, since it might has noise or maybe it just doesn't send anything.
The boot2.img, which I've extracted from version 3.1, is 997K large. I wonder if Xmodem protocol supports to send such a large file.
Thanks for your help, again. I would gather more documents and try to solve this problem. :)

http://www.sourceware.org/ml/ecos-discuss/2003-05/msg00327.html

critor 发表于 2015-10-29 06:21:00

What's the calculator printing before the NAK ?

I've already sent files over 1MB without any problem, so size is not an issue.

Correct settings are :
- Baud rate = 115200
- Data = 8 bit
- Parity = none
- Stop = 1 bit
- Flow control = none

Did you set all these ? They're all important.
(a flow control other than none didn't work for me for example)

dousha99 发表于 2015-11-1 15:48:40

critor 发表于 2015-10-29 06:21
What's the calculator printing before the NAK ?

I've already sent files over 1MB without any prob ...

Sorry that I didn't reply to you for such a long time. This server had encountered some problem so I can't login.
I've checked everything twice, and I've tried every computer that I can reach, none of them works. Well, I guess the problem was on my Arduino. It's said that it has very strong noise that can affect data transmission. I'm going to get a new USB-TTL board and see if it works.
Thanks for your help :)

dousha99 发表于 2015-11-4 22:48:19

This is the full console log while starting up in boot2 flashing mode (Doc + Enter + 2)

Boot Loader Stage 1 (1.1.891Copyright (c) 2006, 2007 Texas Instruments Incorporated
Using production keys

Last boot progress: 0
Clocks:CPU = 90MHz   AHB = 45MHz   APB = 22MHz   

Available system memory: 37292
Checking for NAND: NAND Flash ID: Samsung K9F5608Q0C
PM is turning the device OFF
AM memory test:   Pass
Clearing SDRAM...Done.
Done.
Clearing SDRAM...Boot option: Download Boot2

Keypad request - installing BOOT2 software...

Checking battery level.
Battery level is OK.

Ready to download BOOT2 software...

Begin XMODEM file transfer.

My calc serial number is 2038005632 P-0310B.
I haven't done yet. So far with the help of minicom, I can send out 7 sectors before calculator itself gives up. But there's still thousands of them were not sent :(. What's more, I've tested both of my USB-TTL interfaces. They both work with each other, but just won't work with that calculator!
There's 2 GND pins, do I need to connect both of them to the ground or either of it works? I'm using only one of them. Does it affect anything? Or does it need a programming voltage connected with Vcc? I can hardly get information from google. (What's worse, when I want to find the way to work with nspire on linux, it always gives me how to flash linux instead of what tools I need to use.)

One thing I've noticed is that if I use 5V programming voltage, the screen of nspire will goes off and the console would receive gibberish characters.
I really had reached the limit of my mind. Hopefully I could solve this tough problem. (Things go strange in Luoyang!)
I'm looking forward to your early reply. Thanks for helping me. @critor

critor 发表于 2015-11-12 00:05:57

The boot log seems almost ok.
I'm saying "almost", as some chars seems to be missing - maybe you should recheck your contacts.

Only one gound pin is perfectly ok.

distinguish 发表于 2017-9-25 18:48:40

critor 发表于 2015-10-29 06:21
What's the calculator printing before the NAK ?

I've already sent files over 1MB without any prob ...

你好,请问怎么给工程机大黑刷机?

yangguohong2002 发表于 2017-9-26 07:04:47

有教程
页: [1]
查看完整版本: critor: plz help, got stuck on boot2 flashing. 在给大黄刷boot2的时候遇到问题