[flashrom] Teensy ISP on Synology mainboard

Urja Rannikko urjaman at gmail.com
Mon Aug 31 22:16:54 CEST 2015


Hi, try to keep it on the mailing list too (i made a mistake of both
you and the ML last time...)

On Mon, Aug 31, 2015 at 11:56 AM, Guillaume Maugein
<guillaume.maugein at gmail.com> wrote:
> Hi,
>
> Thanks for the feedback. I'll try to see what I can do with the reset.
>
> I'll let you know if I can manage to ISP with the teensy, but I don't see
> any reason why it could work on an unsoldered chip, but not ISP.

Yeah it should work given a short enough cable and an non-interfering
target; but as you see that sentence, an unsoldered chip is 0
interference and near-0 "cable" length, so it is a very optimal setup.
But i wouldnt have added the little section in the wiki unless i
thought it is possible to do ISP with the teensy.

>
> Maybe I'll try to grip my scope to the signals and see what is going on.
>
>
> If I cannot manage this, would you recommend me buying a bus pirate, or not
> ?
I have 0 experience with buspirate so i cannot say much (except i've
heard it is slow).

If you want what other people are suggesting for ISP get a beaglebone
black (price: ha..), but in general I'll say if you have measurement
tools and can make the NAS not interfere with the ISP the Teensy
should be electrically as good as either of those.

(As i was investigating whether my statement was true or not, this is
what i found:
The Teensy (MK20DX256) with "high drive strength" (that is enabled
currently in the FW) has a drive strength of 9mA.
The BBB has a drive strength (note: just from some forum post) of 4, 6 or 8 mA
The buspirate PIC24FJ64 has an asymmetric drive strength of 3mA high 8mA low
)

>
> 2015-08-31 0:39 GMT+02:00 Urja Rannikko <urjaman at gmail.com>:
>>
>> Hi,
>>
>> On Sun, Aug 30, 2015 at 6:10 PM, Guillaume Maugein
>> <guillaume.maugein at gmail.com> wrote:
>> > Hey,
>> >
>> > First of all, thank you for the great work.
>> >
>> > I am trying to access the Micron N25Q064A13 flash chip on my Synology
>> > NAS
>> > DS413j.
>> >
>> > I happen to have a teensy board available at hand, so I programmed it
>> > with
>> > serprog software, using the instructions to which the flashrom website
>> > points to.
>> > I am under Xubuntu 15.04, and I installed flashrom from the daily builds
>> > ppa.
>> > If I remember, the version was 20150705~ubuntu14.04.1.
>> >>
>> >> xubuntu at xubuntu:~$ flashrom -R
>> >> flashrom v0.9.8-unknown on Linux 3.19.0-25-generic (x86_64)
>> >
>> >
>> >
>> > I connected the programmer with GND, MISO, MOSI, CLK and CS using grips.
>> > As
>> > I am ISP, I did not connect the VCC.
>> >
>> > I double-checked my connections, and they seem to be fine.
>> >
>> > I start the NAS, and using serial terminal (on a different computer), I
>> > stop
>> > the boot sequence at uboot prompt.
>> > If I flinfo in the uboot, I get  the following info :
>> >
>> >> Marvell>> flinfo
>> >>
>> >> Bank#1:
>> >> Flash Base Address  : 0xf8000000
>> >> Flash Model         : ST N25Q064
>> >> Manufacturer ID     : 0x20
>> >> Device Id           : 0xba17
>> >> Sector Size         : 64K
>> >> Number of sectors   : 128
>> >> Page Size           : 256
>> >> Write Protection    : All
>> >
>> >
>> > While the system is waiting on the prompt, I launch a flashrom command,
>> > and
>> > the chip is not recognized :
>> >>
>> >> xubuntu at xubuntu:~$ sudo flashrom -V -p serprog:dev=/dev/ttyACM0:2000000
>> >> flashrom v0.9.8-unknown on Linux 3.19.0-25-generic (x86_64)
>> >> flashrom is free software, get the source code at
>> >> http://www.flashrom.org
>> >>
>> >> flashrom was built with libpci 3.2.1, GCC 4.8.4, little endian
>> >> Command line (3 args): flashrom -V -p serprog:dev=/dev/ttyACM0:2000000
>> >> Calibrating delay loop... OS timer resolution is 1 usecs, 1104M loops
>> >> per
>> >> second, 10 myus = 10 us, 100 myus = 100 us, 1000 myus = 999 us, 10000
>> >> myus =
>> >> 9998 us, 4 myus = 4 us, OK.
>> >> Initializing serprog programmer
>> >> Baud rate is 2000000 now.
>> >> serprog: connected - attempting to synchronize
>> >> .
>> >> serprog: Synchronized
>> >> serprog: Interface version ok.
>> >> serprog: Bus support: parallel=off, LPC=off, FWH=off, SPI=on
>> >> serprog: Maximum write-n length is 2037
>> >> serprog: Maximum read-n length is 400384
>> >> serprog: Programmer name is "Teensy LPC+SPI"
>> >> serprog: Serial buffer size is 2044
>> >> serprog: operation buffer size is 2048
>> >> serprog: Output drivers enabled
>> >> The following protocols are supported: SPI.
>> >> Probing for {... the list is long ...}
>> >>
>> >> Probing for Micron/Numonyx/ST N25Q064..1E, 8192 kB: RDID byte 0 parity
>> >> violation. probe_spi_rdid_generic: id1 0x00, id2 0x00
>> >> Probing for Micron/Numonyx/ST N25Q064..3E, 8192 kB: RDID byte 0 parity
>> >> violation. probe_spi_rdid_generic: id1 0x00, id2 0x00
>> This (0x00 reply) means that there's something wrong with the
>> connections/communications.
>> My guess is either a wiring problem or the NAS is also driving the
>> SPI I/O lines and the Teensy is not strong enough to override (it
>> could also be harmful to the chipset if it was).
>>
>> Maybe try finding a reset line and holding the NAS in reset while
>> doing the programming.
>>
>> Also note that I havent tested the teensy in any ISP application, so
>> you're doing something untested. Have fun :)
>>
>>
>> --
>> Urja Rannikko
>
>



-- 
Urja Rannikko




More information about the flashrom mailing list