This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM243X: How can I use S25FL512S flash instead of S28HS512T?

Part Number: MCU-PLUS-SDK-AM243X
Other Parts Discussed in Thread: SYSCONFIG

Sysconfig only supports 3 Flash model,

Is it possible implementing a new flash driver (S25FL512S) to our custom board? If so, would you please suggest me any source about it?

Thank you.

  • Hi,

    Thanks for your query.

    Can you please refer to below developer note and let us know if it helps?

    AM243x MCU+ SDK: Writing flash driver for a custom flash device

    Regards,

    Prasad

  • Hi Mr. Prasad,

    I am trying to run flash diag example, here is console logs. Do you have any suggest?

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    [OSPI Flash Diagnostic Test] Starting ...
    [OSPI Flash Diagnostic Test] Flash Manufacturer ID : 0xFF
    [OSPI Flash Diagnostic Test] Flash Device ID : 0xFFFF
    [OSPI Flash Diagnostic Test] Executing Flash Erase on first block...
    [OSPI Flash Diagnostic Test] Done !!!
    [OSPI Flash Diagnostic Test] Performing Write-Read Test...
    ERROR: ospi_flash_diag_test_compare_buffers:171: OSPI read data mismatch !!!
    res_write: -1 res_read: 0 status: -1
    Some tests have failed!!
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Onur,

    Can you share the flash_nor_ospi_quad_device_S25HL512S.c file which you are using for this project ?

    Thanks and Regards,
    Aakash

  • Hi Aakash,

    I tried three of them. (S28HS512T, S25HL512T, MX25LM25645G)

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /*
    * Copyright (C) 2021 Texas Instruments Incorporated
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the
    * distribution.
    *
    * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Onur,

    I see that the data is not correctly read. Can you check some of the settings like pinmux, pull-up settings ?

    If all looks good, then I suspect this to be hardware issue. Can you probe them and give us waveform data ?

    Best Regards,
    Aakash

  • Thank you so much Aakash,

    I will check and inform you soon.

  • We couldn't find issue and decide to use S25HL512S

    Thanks.

  • Hi Onur,

    Can you share the data in Tx and data read in Rx ? Is it some cycles delay which is not correctly configured ?

    Thanks and Regards,
    Aakash

  • Hi Aakash,

    I think, I cannot read anything because as you can see, Manufacturer and Device id are 0xFF

    This Flash works as 133MHz, isn't that a problem? Because S25HL512S is 200MHz.

  • Hi Onur,

    Just to confirm that the HW connections are okay, can you probe these lines while running the ospi_flash_diag example and send us the waveform data? You can use the CS as the trigger.

    CLK
    D0/MISO
    D1/MOSI
    CS

    The ospi_flash_diag exampl doesn't use the flash driver or any of the configurations in flash_nor_ospi_quad*.c file. It uses a minimal standard command set in 1s mode, which works with almost all flashes in reset configuration. If the data being read was random value / byte-shifted correct value I could have suggested some SW changes to try out, but even the JEDEC ID read is all Fs. This could mean mostly two things:

    1. There is an issue in the HW connection. Resistor on data line burned out, or soldered not properly that sort of thing. Even the chip select might not be going low. So lines are always pulled high and you're reading FF.
    2. Reset configuration of the flash is not 1s-1s-1s. This is easy enough to check in the datasheet of the flash. If this is the case, then we need to see what configuration the flash is in, and manually write a flash open function to configure the driver to communicate to the flash's current state.

    Either way, the OSPI lines probe would be helpful, so please let me know when that can be given.

    Regards,
    Anand M

  • Hi Anand,

    I as said before, we decide to use default FLASH.

    Thank you for your help.

  • Hi Onur,

    Can you share the flash_nor_qspi.c, flash_nor_qspi.h, flash_nor_qspi_device_S25FL512S.c.

    Also, Can you check on the pinmux settings for QSPI. The am243x-lp has a qspiflash and we have configured for the same. I suggest you to check that syscfg and pin mux settings.

    If you could share the schematic of how am243x is interfaced with S25FL512S. That would also be really helpful.

    Best Regards,
    Aakash

  • Aakash,

    It's too late because we order new Flash.

    Thank you.