-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[msom] support 16MB GD flash. #2701
Conversation
5a63e55
to
adf0972
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main issue is that I cant seem to get writes >9 bytes to succeed. Can you reproduce the same behavior?
hal/src/rtl872x/exflash_hal.cpp
Outdated
FLASH_WaitBusy(WAIT_WRITE_DONE); | ||
|
||
// Write/Erase disable | ||
FLASH_TxCmd(GENERIC_FLASH_CMD_WRDI, 0, nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we return SYSTEM_ERROR_NONE
after this command?
It looks like execution will continue past the if (flash_init_para.FLASH_Id == FLASH_ID_GD) {}
block and return ERROR NOT SUPPORTED?
hal/src/rtl872x/exflash_hal.cpp
Outdated
} | ||
}); | ||
memcpy(ptr, addrBuf, 3); | ||
memcpy(ptr + 3, buf, size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to allocate an intermediate buffer because the address bytes + data need to be contiguous when sent with FLASH_TxCmd()
?
Does the data need to be in heap / PSRAM or not?
88f8358
to
83ba32e
Compare
83ba32e
to
357fb96
Compare
RTK_SPIC_DATA_WORD = 2 | ||
}; | ||
|
||
static void rtkSpiFlashSetDataReg(uint32_t index, uint32_t data, enum RtkSpicFlashDataWidth byteWidth) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: instead of static might be better to just move to an anonymous namespace.
[msom] support 16MB GD flash.
As the title describes.
This PR doesn't include the updating of memory map.
References
N/A
Completeness