求助:不能按扇区写入

SCS_L; usb_write_8_COM(0x4C); //以扇区为单位写入命令 usb_write_8_DATA(3); SCS_H; ass1=usb_zhongduan_duqu(); //读取中断标志 if(ass1==0x14) { SCS_L; usb_write_8_COM(0x27); //读取写入允许扇区和起始LBA usb_read_8(); shanqu=usb_read_32(); //读取的最低位为1,可能扇区为1 qushi_LAB=usb_read_32(); //起始LBA SCS_H; usb_delay(20); SCS_L; usb_write_8_COM(0x56); //输入起始地址和扇区数 usb_write_8_DATA(qushi_LAB); usb_write_8_DATA(qushi_LAB>>8); usb_write_8_DATA(qushi_LAB>>16); usb_write_8_DATA(qushi_LAB>>24); usb_write_8_DATA(shanqu); SCS_H; ass1=usb_zhongduan_duqu(); //读取允许输入标志 if(ass1==0x1E) { kuai_zongshu=shanqu_shu_a*8; do { usb_25X40_DUQU(w25x40_duqu_zushu); //usb存储读取( 第几组数据) shuju_zhizhen=cunchu_zan; //将指针指向数组起始地址 usb_shanqu_xieru(shuju_zhizhen,w25x40_duqu_zushu,1); //扇区写入(数据起始指针,数据长度) SCS_L; usb_write_8_COM(0x57); SCS_H; ass1=usb_zhongduan_duqu(); //读取允许输入标志 if(ass1!=0x1E) {break;} }while(--kuai_zongshu); } }

你详细的说明一下,错误的现象。


只有登录才能回复,可以选择微信账号登录