On 19.01.2008 19:34, Ronald Hoogenboom wrote:
Carl-Daniel Hailfinger wrote:
*/
//while (generic_spi_read_status_register() &
JEDEC_RDSR_BIT_WIP)
while (generic_spi_read_status_register() & JEDEC_RDSR_BIT_WIP) myusec_delay(10);
//if (i%1024==0) fputc('b',stderr);
if (i % 1024 == 0)
}printf("b");
There is a problem with using printf like this and that is: stdout is line buffered. The 'b''s won't show until a newline is output or fflush is called. That's why I used fputc initially. If you do this with the 'pio mode' writing, you should do this for all methods an all chips for constistent behaviour, so that is why I commented it out initially.
Ah OK. I'll drop that part. Did you have time to test with the while (generic_spi_read_status_register() & .._WIP) enabled? It would be more correct to have it enabled.
Regards, Carl-Daniel