fx3_firmware: speed up flash operations
Remove the sleep operation after each flash command and increase the SPI clock rate on the micro.
This commit is contained in:
parent
73b00c8b68
commit
466aa7ba79
2 changed files with 4 additions and 3 deletions
|
|
@ -216,6 +216,10 @@ CyU3PReturnStatus_t NuandFlashInit() {
|
|||
|
||||
status = CyFxSpiInit();
|
||||
|
||||
if (NuandGetSPIManufacturer() == 0xEF) {
|
||||
CyU3PSpiSetClock(30000000);
|
||||
}
|
||||
|
||||
glAppMode = MODE_FW_CONFIG;
|
||||
|
||||
return status;
|
||||
|
|
|
|||
|
|
@ -205,9 +205,6 @@ CyU3PReturnStatus_t CyFxSpiTransfer(uint16_t pageAddress, uint16_t byteCount,
|
|||
byteAddress += FLASH_PAGE_SIZE;
|
||||
buffer += FLASH_PAGE_SIZE;
|
||||
pageCount--;
|
||||
|
||||
if (!spiFastRead)
|
||||
CyU3PThreadSleep(15);
|
||||
}
|
||||
|
||||
return CY_U3P_SUCCESS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue