AM2434: Custom flash quirks function

Part Number: AM2434
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi There,

I need to set some configuration options for the flash on a custom board using the quirks function, almost identical to how the Flash_quirkSpansionUNHYSADisable() function works on the AM243x-LP.

However, I note that Flash_norOspiRegWrite() / Flash_norOspiRegRead() are marked static inside flash_nor_ospi.c.

It looks like I would have to modify the SDK to put my custom function inside flash_nor_ospi.c, I would prefer to avoid that (if possible).

Can you advise, is there another way? Is there an exposed API I can call instead to read/write the flash configuration?

Thanks in advance,

  • Hi,

    If it is a Serial NAND/NOR OSPI/QSPI Flash, then you can go ahead and write code for custom flash configuration.

    The current SDK has the implementation of Flash_quirkSpansionUNHYSADisable, where the flash is set as Uniform mode and not Hybrid mode.

    This also means that the flash driver in the SDK is made to work in Uniform mode of flash.

    Now, to understand about the uniform and hybrid mode, I would recommend reading through exactly this section from the FAQ:  RE: [FAQ] PROCESSOR-SDK-AM62X: Uniform vs Hybrid Flash Configuration 

    In order to write the custom code, it is recommended to modify the existing function, that is, Flash_quirkSpansionUNHYSADisable, or you can also define a new function, lets suppose Flash_customConfiguration, and proceed to define this in the SysConfig as well.

    Also, since you will define this custom function, in the file flash_nor_ospi.c itself, hence there should be no problem calling the functions  Flash_norOspiRegWrite() / Flash_norOspiRegRead().

    Thanks,

    Vaibhav

  • It looks like I would have to modify the SDK to put my custom function inside flash_nor_ospi.c, I would prefer to avoid that (if possible).

    As far as you have not overwritten the already existing quirks function and defined a new function as stated above: Flash_customConfiguration, you should be okay to go ahead with, as you are not breaking the SDK Flash init flow, but just adding a piece of code for your custom flash. SO, even upon failures, you will be knowing that one of the bottlenecks could be incorrect custom flash configuration code defined in flash_nor_ospi.c. Hope this helps.