Recent Forum Posts
From categories:
page 1 of 212next »
Programming NAND
Gor (guest) 16 Jan 2009 17:21
in discussion Development / Programming » Programming NAND

How to read UID with NAND Samsung (it is concrete from microcircuits K9FXG08XXX).
In datasheet specify just it is supported Unique ID but as it to use - words.
Tried a command " Read ID " (0x90) to read more than 5 байтов - returns repetitions 5 байтов.
Tried under recommendation ONFI to read a command 0xED.
Too it is impossible.

Programming NAND by Gor (guest), 16 Jan 2009 17:21
Nand dumping.
mithrismithris 26 Jan 2008 16:00
in discussion Development / Programming » Nand dumping.

Some quick and dirty code to dump stuff from the JXD301s internal NAND.

#define PF_DIR                (*((volatile unsigned short *)0xFFC00730))
#define PF_INEN                (*((volatile unsigned short *)0xFFC00740))
#define PF_DATA                (*((volatile unsigned short *)0xFFC00700))

#define NAND_COMMAND        (*((volatile unsigned char *)0x20004000))
#define NAND_ADDRESS        (*((volatile unsigned char *)0x20008000))
#define NAND_DATA             (*((volatile unsigned char *)0x20000000)) 

void dumpnand()
{
    // Set PF4 DIR to output

    PF_DIR |= (1 << 4);

    // Disable buffer
    PF_INEN &= ~(1 << 4);

    // Set outut
    PF_DATA &= ~(1 << 4);

    NAND_COMMAND = 0;

    NAND_ADDRESS = 0;
    NAND_ADDRESS = 0;
    NAND_ADDRESS = 0;
    NAND_ADDRESS = 0;
    NAND_ADDRESS = 0;

    // Read command.
    NAND_COMMAND = 0x30;
    for (int i = 0; i < 3600; ++i) {
        PF_DIR |= (1 << 4);
    }

    unsigned char *buf = (unsigned char *)0x200000;
    for (int i = 0; i < 0x840; ++i) {
        *buf++ = NAND_DATA;
    }

}

void dumpnandpage(unsigned int page, void *destination)
{

    // Set PF4 DIR to output

    PF_DIR |= (1 << 4);

    // Disable buffer
    PF_INEN &= ~(1 << 4);

    // Set outut
    PF_DATA &= ~(1 << 4);

    // Address command
    NAND_COMMAND = 0;

    // First clock. 
    NAND_ADDRESS = 0;

    // Second
    NAND_ADDRESS = 0;

    // This is where we input our address.
    NAND_ADDRESS = page & 0xff;
    NAND_ADDRESS = (page >> 8) & 0xff;
    NAND_ADDRESS = (page >> 16) & 0xff;

    // Read command.
    NAND_COMMAND = 0x30;
    // Wait a bit.
    for (int i = 0; i < 3600; ++i) {
        PF_DIR |= (1 << 4);
    }

    unsigned char *buf = (unsigned char *)destination;
    for (int i = 0; i < 0x840; ++i) {
        *buf++ = NAND_DATA;
    }

}
Nand dumping. by mithrismithris, 26 Jan 2008 16:00

and those are rafb links, so you better read fast. :)

Re: JXD 301 boot process. by mithrismithris, 02 Jan 2008 21:24

Uh, wrong link to the NAND block disasm.
should be: http://rafb.net/p/d2tLel93.html

Re: JXD 301 boot process. by mithrismithris, 02 Jan 2008 21:23

We've been investigating the boot process a bit.

First i dumped the internal boot rom, which turned out to do what we expected it do do, it's just what the manual describes about
the different boot modes. (http://gp32.misantrop.org/BootRom.txt)

The JXD boots up as a SPI slave.

Then Robbo, the mad electronics wizard intercepted the SPI data beeing send to the BF with his scope, and somehow, with black magic
he managed to make a binary out of it which we disassembled. (http://rafb.net/p/y0HqAD46.html)

There we found out that it loads the first block from NAND and appears to execute it.

So, i slapped some code together to dump the first NAND block. (http://rafb.net/p/myMfnw43.html)
This code contains what appears to be code that loads more stuff from NAND, and also some exception handlers.

I'm currently looking into more closely what it loads from NAND, and to where.


m

JXD 301 boot process. by mithrismithris, 02 Jan 2008 21:16
Re: First steps!
mithrismithris 15 Dec 2007 13:10
in discussion Development / Programming » First steps!

The DMA registers are for DMA channel 5, which is the one used for SPI.
It's in write memory mode, so if i understood it correctly it's reading data from SPI as it comes in
and writes it to 0x01dadf70

Re: First steps! by mithrismithris, 15 Dec 2007 13:10
Re: First steps!
mithrismithris 15 Dec 2007 13:08
in discussion Development / Programming » First steps!

The BF is a SPI slave it appears, atleast when i break it, and here is some of the information i've discovered:

Deb> run "dmas.txt"
I: 0xffc00d40 : 0xef35e341
I: 0xffc00d44 : 0x01dadf70
I: 0xffc00d48 : 0x10c3
I: 0xffc00d50 : 0x0010
I: 0xffc00d54 : 0x0001
I: 0xffc00d58 : 0xe6ce
I: 0xffc00d5c : 0xf958
I: 0xffc00d60 : 0xfc32
Deb> run "spi.txt"
I: 0xffc00500 : 0x4012
I: 0xffc00504 : 0xff00
I: 0xffc00508 : 0x0001
I: 0xffc0050c : 0x00aa
I: 0xffc00510 : 0x00ff
I: 0xffc00514 : 0x005f
I: 0xffc00518 : 0x00ff
Deb> dump 0x1dadf70
I: 0x01dadf70: 55AE8301 FF007494 A79D60AB 9F00FFAA

Re: First steps! by mithrismithris, 15 Dec 2007 13:08

Yes, we care. Greetings from southern Europe.

I can't wait until this thing runs uClinux

Will(From MP4Nation)

Re: JXD301 JTAG by programatwillprogramatwill, 12 Dec 2007 02:09

Could be useful for quicker development, and, it'd be easier to use ADIs tools.

But there will probably be some differences between the devkit and the JXD, or any other bfin PMP.


mithris

Re: Hardware Development Kit by mithrismithris, 11 Dec 2007 18:54

Would it be of any use to purchase a dedicated Blackfin development kit?

http://www.blackfin.org/developmentboards.php?id=23

Hardware Development Kit by CoLD SToRAGECoLD SToRAGE, 10 Dec 2007 22:47

I'm 95% sure Timer1 and Timer2 are used for H/VSYNC.
Timer2 had a period of 262 * <period of Timer1>.

And the PPI control register says it's not using ITU-656 and 8bit output iirc.

The timers have a flag that can let them keep ticking in emulation mode, so when i stop
the core the timers without that flag set will stop ticking.
Timer1 and Timer2 does not have that flag, but they will tick when i leave emulation mode
ofcourse.


mithris
(I can't log in for some reason)

Timer1 & Timer2 might be runing also because there must be HSYNC/VSYNC signal for normal LCD panel.
In my guess, you stopped bfin just before timer1/2 startup. If it's not the case then LCD must use embedded
sync code like ITU-656 (rare case for general TFT panel).

great.
but WDSIZE in dma0 config & x_increment value shows that PPI uses 2D DMA and transfer 640*2x262 bytes.
i guess LCD must be 320x240 32bpp pannel (24bit RGB + 8bit padding) and data in framebuffer
(@0x01dae570) could be used for verification.

Re: First steps!
mithrismithris 09 Dec 2007 21:50
in discussion Development / Programming » First steps!

Timer0's output appears to be driving the backlight btw.
Thats the only timer thats still running when in emulator mode..


m

Re: First steps! by mithrismithris, 09 Dec 2007 21:50
Re: First steps!
mithrismithris 09 Dec 2007 11:04
in discussion Development / Programming » First steps!

DMA #0 registers

I: 0xffc00c00 : 0x01f50880
I: 0xffc00c04 : 0x01dae570
I: 0xffc00c08 : 0x6835
I: 0xffc00c10 : 0x0280
I: 0xffc00c14 : 0x0002
I: 0xffc00c18 : 0x0106
I: 0xffc00c1c : 0x0002
I: 0xffc00c20 : 0x01f508a0
I: 0xffc00c24 : 0x01defa9c
I: 0xffc00c28 : 0x0008
I: 0xffc00c2c : 0x0000
I: 0xffc00c30 : 0x026a
I: 0xffc00c38 : 0x0035

Indicating it's a 2D transfer 640x262 bytes, reading from memory to PPI.
And it's using descriptors and stuff.

PLL Settings:
I: 0xffc00000 : 0x6403
I: 0xffc00004 : 0x0003
I: 0xffc00008 : 0x009b
I: 0xffc0000c : 0x00a2
I: 0xffc00010 : 0x0200


m

Re: First steps! by mithrismithris, 09 Dec 2007 11:04
Re: First steps!
mithrismithris 09 Dec 2007 01:28
in discussion Development / Programming » First steps!

Give it a week or so. :)

Re: First steps! by mithrismithris, 09 Dec 2007 01:28

So, how long until you got your racing game up and running? ;)

Re: First steps!
mithrismithris 08 Dec 2007 14:38
in discussion Development / Programming » First steps!

Ok, some more info about the PPI setup.

Control: 0x809f
Status : 0x0000
Delay: 0x00f4
Count: 0x04ff
Frame: 0x0000


m

Re: First steps! by mithrismithris, 08 Dec 2007 14:38
page 1 of 212next »
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License