cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to program or debug external nor flash (h743 eval)

ranran
Senior II

Hello,

Till now, I've debuged my application on internal flash with stm32h743 eval.

Now, I try to use external falsh.

But as I describe below both IAR debugging and stm32programmer fail with the external flash using the stm32cubeh7 example and the eval board.

1. I changed the following code:

-SCB->VTOR = 0x08000000
 +SCB->VTOR = 0x60000000

and also changed in .icf file.

 But on pressing "download and debug", there is no stopping in main breakpoint. Nothing happens.

  

2. I then checked in IAR -> debugger -> download

The "override default .board file" was not checked, so I checked the box.

($TOOLKIT_DIR$\config\flashloader\ST\FlashSTM32H753xI.board )

Note that on checking the contents of FlashSTM32H753xI it shows 2 banks of 0x08000000 (which is the internal flash, not the external !)

 Then, on pressing "download and debug" nothing happens and I don't see it stopped in main() breakpoint.

3. The next thing I tried is to use stm32programmer

I build for .out file, I then chose the correct external flash "M29W128GL_STM32H743I-EVAL", I erased the full chip , created .bin file, but on doing download it to 0x6000000 with vierfy.

Seems that erase and download is done without errors, but verification fails:

14:31:55:587 : Memory Programming ...
14:31:55:587 : Opening and parsing file: C:\projects\mcu\software\en.stm32cubeh7\STM32Cube_FW_H7_V1.3.0\Projects\proj\RHS\oper\EWARM\STM32H743_EVAL\Exe\Project.bin
14:31:55:588 : File : C:\projects\mcu\software\en.stm32cubeh7\STM32Cube_FW_H7_V1.3.0\Projects\proj\RHS\oper\EWARM\STM32H743_EVAL\Exe\Project.bin
14:31:55:588 : Size : 130031 Bytes
14:31:55:588 : Address : 0x60000000 
14:31:55:588 : Erasing Segment <0> Address <0x60000000> Size <130031>Bytes
14:31:55:588 : Erasing memory corresponding to segment 0:
14:31:55:589 : Memory erase...
.....
14:31:58:219 : run ap 0 
14:31:58:220 : halt ap 0 
14:31:58:220 : r ap 0 reg 0 0x00000001
14:31:58:228 : r ap 0 @0x60000000 0x00000400 bytes
14:31:58:228 : Error: Verification issue at address 0x60000000 (byte = 0xFF)
14:31:58:228 : Error: Download verification failed

 Note that although the readme says to flash ""M29W128GL_STM32H743I-EVAL", in the EVAL guide it shows in schematic PC8F128M29EWLA.

As you can see in the log, the verification failed.

Note that erasing external full chip is successful.

Thank you,

ran

14 REPLIES 14

Will have to check the part# and performance in Keil later. I wouldn't expect read/write of external NOR to be very fast at all. If you have a lot of data the download-debug will drag quite significantly.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

You don't have to put everything in external memory. The vector table and interrupt handlers can very well stay in the internal flash, together with your bootstrap code. It will be more robust and reliable this way.

-- pa

ranran
Senior II

Thanks all for the comments,

But I still not sure:

  1. Is it possible to debug in external flash using debugger ? If yes - why doesn't it work ? Why does stm32cubeh7 board file for IAR are only for internal flash and not external flash ?
  2. Why does external programmer fail to flash program the .bin file ? (erase works, program done, but verification - fails)

Thanks,

ran

PC28F128M29EWL

https://www.micron.com/products/nor-flash/parallel-nor-flash/part-catalog/pc28f128m29ewla

Mine has an Intel variant placed

Keil has a loader M29W128GL_STM32H743I-EVAL 16MB (128Mb), which I expect is compatible/equivalent

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III
  1. Yes. Why doesn't it work? Maybe because you've never succeeded to put the code into the ext. flash.
  2. This question should be directed to IAR. Meanwhile you can write your own loader  and learn how to program the ext. flash.

-- pa

Hello Clive,

Do you use H743eval ?

If yes - How did you find out what exist in your eval board ? Isn't it what in eval guide pdf ? It shows there MT28EW128ABA1LP , so how can you have somthing else ?

Does it work in your side , i.e. can you debug and program the external flash ?

Thank you,

ran

Yes, I have an STM32H743I-EVAL board.

I, read the part# from the top of the device.​

I don't currently have a project using the external NOR, I might try when it is convenient. ​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thank you very much .

Keil downloaded and verified 1MB of data placed in NOR, had to increase RAM setting for flash algorithms to accommodate loader+data

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..