When reading the chip_id, it can be read successfully once, but when reading the status state, whether it is read before or after reset, it needs to cycle many times to get the initial value 0x01. I think there should be a problem there, although it is not here. It will have an impact, just read it a few more times, but if there is an inaccurate reading of new_date and other values later, it will cause a huge problem. So I would like to ask if you guys have any good solutions, or find out what my problem is? //检测芯片型号Detection chip model do { regAddress=0xD0; read(bme,regAddress,®Value,rSize); bme->chipID=regValue; }while(bme->chipID!=0x61); //测试程序test program status regAddress=0xf3; read(bme,regAddress,®Value,rSize); bme->status=regValue; //reset芯片 regAddress=0x60; command=0xB6; write(bme,regAddress,command); //换页前检测Detection before page change do{ regAddress=0xf3; read(bme,regAddress,®Value,rSize); bme->status=regValue; }while(regValue!=0x01); //开始换页start page feed regAddress=0x73; command=0x10; write(bme,regAddress,command); bme->Delayms(10); //检测换页结果Detect page break results do { regAddress=0xf3; read(bme,regAddress,®Value,rSize); bme->status=regValue&0x10; }while(bme->status!=0x10);
... View more