2019-01-03 03:44 AM
Hello,
I run the FMC nor example for stm32h743 eval, with the eval board, and I get very poor timing:
I used the original configuration , and only changed DataSetupTime from 8 to 10 (with the original configuration, the test fails with my eval board ! ).
Yet, the write speed of NOR flash is extremely slow:
Writing 64KB took 3 minutes and 10 seconds --> speed is 360 B/sec !
Does it make sense that nor write is so slow ? Is it the HW write speed or ineffective write routine (or both) ?
Thank you,
ran
Is there any idea ?
Thanks
ran
2019-01-13 02:22 AM
Hi,
Is there anything which can explain the VERY slow speed of nor flash in my point.
I am just using the same example from stm32cubeh7.
Is it that the NOR flashed in my eval board is different and slower ? Is it that the example is not effeceint enough ? Or is it the the speed is so slow (360 B/s) ?
Thank you,
ran
2019-01-13 05:36 AM
I used the BSP routines described above, in Keil, in an application I had previously built, were I add an array and directed it's placement in the NOR via the scatter file. I added the external flash to the debuggers list of flash algorithms, and allocated enough RAM so the loader+data could coexist and be downloaded when I started the debugger. The debugger wrote to both internal and external flash, and verified, in a few tens of seconds. I also checked the NOR content via the STM32 Cube Programmer application.
The data in the array was not properly visible to the debugger/application at run time.
2019-01-13 05:55 AM
I don't know, have we even establish what device is mounted on your board. The examples say it is an PC28F128M29EWLA, which is nominally a Micron or Intel device depending on who owned the fab at any given time. http://www.marketwatch.com/story/micron-to-buy-out-intels-share-of-flash-joint-venture-for-15-billion-2018-10-18
ST's loader uses the alternate name of a notionally equivalent part, or second source part#
M29W128GL_STM32H743I-EVAL
Examining the .stldr file, the PLL and NOR timings seem to be the same as those described in the NOR BSP file for the board. And do read, write, verify the content properly. For a megabyte, or so, this takes a few tens of seconds, not minutes to occur.
The issues at the application level seem real, but it is not my project, and I can't spend hours of time troubleshooting it. ST did not furnish this board to me, and they are not paying for my time here.
2019-01-13 06:53 AM
Hi Clive,
What can explain this low speed in my case ? I see that what takes time is the following lines of code:
/* Write data to the NOR memory */
for (uwIndex = 0; uwIndex < st; uwIndex++)
{
/* Write data to NOR */
HAL_NOR_Program(&hnor, (uint32_t *)(NOR_BANK_ADDR + 2*uwIndex), &aTxBuffer_nor[uwIndex]);
/* Read NOR device status */
if(HAL_NOR_GetStatus(&hnor, NOR_BANK_ADDR, PROGRAM_TIMEOUT) != HAL_NOR_STATUS_SUCCESS)
{
return HAL_NOR_STATUS_ERROR;
}
}
If I remove HAL_NOR_GetStatus, then it becomes faster, but data is invalid.
So, is it a real HW issue ?
Maybe the NOR flash in "my" eval board is slower than in your eval board (although it should have been the same because both of us use stm32h743-eval ) ?
Thanks,
ran
2019-01-13 07:13 AM
-
2019-01-13 07:24 AM
Hello Clive,
Can you please see image.
I don't understand.
In U12 , it shows 7KA15 (not like yours).
Yet, According to this page
https://www.micron.com/products/nor-flash/parallel-nor-flash/part-catalog/mt28ew128aba1lpc-0sit
It seems that I have mt28ew128aba1lpc (7KA15 is the FBPA name for the chip).
Another interesting thing I noticed, if is that systemclock_config has much influence on the time it takes to do the flash nor programming.
I still not sure which exact clock is responsible for this.
Thank you!
ran
2019-01-16 06:50 AM
Hello,
I tested on the STM32H743I-EVAL board Rev B with the example you quoted above with the PC28F128M29EWLA NOR memory and it works well.
Best Regards,
Mohamed Aymen.
2019-01-16 07:17 AM
Hello Mohamed-aymen,
Thank you.
What is the approximate speed ?
When I tested it with the example I get that for 127kB (127*512 words array) it takes about 1 minute and 30 seconds -> ~2.2 KB/seconds
What is the speed in your case ?
Best Regards,
Ran
2019-01-16 07:36 AM
Hello,
Without changing anything in the Firmware example, it takes about 7 seconds.
Best Regards,
Mohamed Aymen.
2019-01-16 08:52 AM
Hello Mohamed,
Thank you for the assistance.
It means , that writing rate is 0x1000/7 = 585 Bytes/seconds, which is extremely slow.
So, If you need to write 127k Bytes , it shall takes almost ~4 minutes !
I think that NOR is expected to be have a much faster speed.
So, Why NOR flash programming using this example is so slow ?
Best Regards,
Ran