Поменял чип,мертвяком все так и стоит. в результате борьбы код пока только для чтения ID
uint8_t i;
uint32_t temp;
PORT_NAND_ALE->FIODIR |= PIN_NAND_ALE; // address latch enable
PORT_NAND_CLE->FIODIR |= PIN_NAND_CLE; // command latch enable
PORT_NAND_RE->FIODIR |= PIN_NAND_RE; // read enable
PORT_NAND_WE->FIODIR |= PIN_NAND_WE; // write enable
PORT_NAND_CE1->FIODIR |= PIN_NAND_CE1; // chip enable
PORT_NAND_RE->FIOPIN |= PIN_NAND_RE; // read enable
PORT_NAND_WE->FIOPIN |= PIN_NAND_WE; // write enable
PORT_NAND_CE1->FIOCLR |= PIN_NAND_CE1; // chip enable
// command 0x90
PORT_NAND_ALE->FIOCLR |= PIN_NAND_ALE;
PORT_NAND_CLE->FIOSET |= PIN_NAND_CLE; // command latch enable
PORT_NAND_DATA->FIODIR |= (uint32_t)(0xFF << PIN_NAND_DATA); // data bus for IO
PORT_NAND_DATA->FIOCLR |= (uint32_t)(0xFF << PIN_NAND_DATA); // data bus for IO
PORT_NAND_DATA->FIOPIN |= (uint32_t)(CMD_READID << PIN_NAND_DATA); // data bus for IO
PORT_NAND_WE->FIOCLR |= PIN_NAND_WE; // write enable
_delay_ms(1);
PORT_NAND_WE->FIOSET |= PIN_NAND_WE; // write enable
PORT_NAND_CLE->FIOCLR |= PIN_NAND_CLE; // command latch enable
// adress 0x00
PORT_NAND_ALE->FIOSET |= PIN_NAND_ALE; // address latch enable
PORT_NAND_DATA->FIODIR |= (uint32_t)(0xFF << PIN_NAND_DATA); // data bus for IO
PORT_NAND_DATA->FIOCLR |= (uint32_t)(0xFF << PIN_NAND_DATA); // data bus for IO
PORT_NAND_DATA->FIOSET |= (uint32_t)(0x00 << PIN_NAND_DATA); // data bus for IO
PORT_NAND_WE->FIOCLR |= PIN_NAND_WE; // write enable
_delay_ms(1);
PORT_NAND_WE->FIOSET |= PIN_NAND_WE; // write enable
PORT_NAND_ALE->FIOCLR |= PIN_NAND_ALE; // address latch enable
//read id
PORT_NAND_DATA->FIODIR &= ~(uint32_t)(0xFF << PIN_NAND_DATA); // data bus for IO
PORT_NAND_RE->FIOSET |= PIN_NAND_RE; // Read enable
for(i = 0; i < 7; i++)
{
PORT_NAND_RE->FIOCLR |= PIN_NAND_RE; // read enable
_delay_ms(1);
temp = (PORT_NAND_DATA->FIOPIN);
temp = 0xFF & (temp >> PIN_NAND_DATA);
xprintf("bID%02x: %02x\r\n", i, temp);
PORT_NAND_RE->FIOSET |= PIN_NAND_RE; // read enable
}
PORT_NAND_RE->FIOCLR |= PIN_NAND_RE;
PORT_NAND_CE1->FIOSET |= PIN_NAND_CE1; // chip enable
И тишина...