STM32H7B3 External OSPI Flash (Micron) - DSK - Read & Test data issues (Mem-mapped)

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • STM32H7B3 External OSPI Flash (Micron) - DSK - Read & Test data issues (Mem-mapped)

      DSK Template project was used to build a ELF that satisfies the JFlash utlities requirement (Section,segment etc). The ELF works well in all erasing aspects.
      Reading works (i have doubts though, read below). Because when i use an other test project (built on different IDE) to crosscheck & comapre the read contents from jflash, i see a difference. based on this i got 2 questions.
      Any help or thoughts higly appreciated.

      1. When we use struct "FlashDevice" ; there is a param TimeoutProg; Ex:"140 pages (page =256 bytes) to flash; then API "SEGGER_FL_Program()" is called once with a generated data 140x256 bytes size of data (by Jflash)
      When each page is being flashed, how will Jflash know if timeout occured for each of 140 pages ? (since we loop)
      I ask this question because program multiple large sectors results in timeout and partial flash; but small chunks work well.
      i have timeout set at 200 ms

      2. When i generated 256 bytes of "generated test data", it programs without timeouts and it flashes all correctly. I verified it via another test project/IDE where, i see all bytes are flashed OK. But when i read back same data from JFlash i see this
      (with this can i say that reads are not correct ? Also from picture below, i dont understand why the flash went ahead and SEEM to program further ahead of 256 bytes when i read more data ahead of 256 bytes . (But when i verify via other tool. its all correctly flashed till FF bytes)
    • Here is my struct

      struct FlashDevice
      { "Template flash" },
      //0x00080000, // Flash size == 512 KB
      0x04000000, // Flash size == 64MB
      256, // Make sure that SEGGER_FL_Program() is called with a multiple of 4 bytes
      200, // Programing timeout (set to 200 ms)
      6000, // Erasing a 128 KB sector can take some time...
      // Sectorization:
      { 0x00020000, 0x00000000 }, // 512 * 128 KB
      { 0xFFFFFFFF, 0xFFFFFFFF } // Indicates the end of the flash sector layout. Must be present.
    • There was a similar question in forum :
      [SOLVED] J-Link Flash Loader: erase and program maximum times in FlashDevice

      But when it comes to prgram

      SEGGER_FL_Program() takes a param -> Number of bytes to be programmed (always a multiple of FlashDevice.PageSize)
      Does it mean we have to program a page and return ? ( which i doubt), so how does the timeout for program work when we loop thru several pages to cover the NumBytes to program ?