Other Parts Discussed in Thread: SYSCONFIG, AM62P, UNIFLASH
部件号: AM62P
主题中讨论的其他器件: SYSCONFIG、 UNIFLASH
/* Set device size and addressing bytes */
OSPI_setDeviceSize(obj->ospiHandle, attrs->pageSize, attrs->blockSize);
/* Set command opcode extension type */
OSPI_setCmdExtType(obj->ospiHandle, config->devConfig->cmdExtType);
/* Set initial number of address bytes */
obj->numAddrBytes = 3;
/* Set current protocol as 1s1s1s */
obj->currentProtocol = FLASH_CFG_PROTO_1S_1S_1S;
/* Now configure the flash for the selected protocol */
status += Flash_norOspiSetProtocol(config, obj->ospiHandle, params);
obj->currentProtocol = config->devConfig->protocolCfg.protocol;
/* recheck the 8D mode reg */
// read reg in 8D manner
uint8_t reg_8dflag_imme[3] = { 0 };
status = Flash_norOspiCmdRead(config, 0x85, 0x00000000, 4, 7, reg_8dflag_imme, 4);
/* read ID */
uint8_t reg_id_imme[5] = { 0 };
status = Flash_norOspiCmdRead(config, 0x9F, 0x00, 4, 7, reg_id_imme, 4); // dummy=7, result is aligned



