Skip to content

Added serial flash functions for RCM4200#28

Open
neacsum wants to merge 3 commits intodigidotcom:masterfrom
neacsum:upstream
Open

Added serial flash functions for RCM4200#28
neacsum wants to merge 3 commits intodigidotcom:masterfrom
neacsum:upstream

Conversation

@neacsum
Copy link
Copy Markdown

@neacsum neacsum commented Feb 26, 2021

RCB42XX.LIB contains serial flash functions optimized for the Adesto AT45DB641E used by RCM4200 modules. Both reading and writing speed have been improved with reading speed almost double from 0.8 ms/page to 0.4 ms/page. Also both reading and writing functions are no longer limited to page size. They can work on large blocks up to the available RAM.

SFLASH_INSPECT.C program has been updated to use the new functions ands fitted with additional commands.

@tomlogic
Copy link
Copy Markdown
Contributor

tomlogic commented Mar 1, 2021

I'm curious if the optimizations could go into the generic SFLASH.LIB and apply to all products.

But I probably can't merge this into the official Dynamic C 10 release since I don't have an automated testing infrastructure for fully testing it. At this point I am focused on maintaining the codebase and fixing obvious bugs with minimal impact outside of the changed code.

I hope you'll keep it available to others who may be interested in improved flash performance on the RCM4200.

@neacsum
Copy link
Copy Markdown
Author

neacsum commented Mar 1, 2021

I'm curious if the optimizations could go into the generic SFLASH.LIB and apply to all products.

Probably not. At least I couldn't do it, as I don't have the means to test them on other boards with serial flash.

I hope you'll keep it available to others who may be interested in improved flash performance on the RCM4200.

Sure. They will remain available in my fork of the repo. Feel free to close the PR if you think so.

@tomlogic
Copy link
Copy Markdown
Contributor

I'm curious as to how this compares to using the sbf_far_Read() and sbf_far_WriteFlash() APIs to read/write that flash.

@neacsum
Copy link
Copy Markdown
Author

neacsum commented Jun 18, 2021 via email

@neacsum
Copy link
Copy Markdown
Author

neacsum commented Jun 21, 2021

I'm curious as to how this compares to using the sbf_far_Read() and sbf_far_WriteFlash() APIs to read/write that flash.

Got some time to look into sbf... functions:

  1. BOOTDEV_SFLASH.LIB clashes with FLASHWR.LIB. Functions like _SectorToLong, getFlashID, getFlashWriteMode, getFlashSize, etc. are defined in both libraries.

  2. BOOTDEV_SFLASH was designed only for RCM4300, BL4S100 and RCM5xxx series.

Final answer is that sbf_far_Read and sbf_far_Write cannot be used for RCM4200 boards.

@tomlogic
Copy link
Copy Markdown
Contributor

Ah yes, I sometimes confuse the RCM4200 and RCM4300 because they swapped names during development.

The RCM4300 has a serial boot flash (SBF) and the RCM4200 has a serial data flash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants