Debugging STM32H745

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

    • Debugging STM32H745

      Hello,


      I have a few questions regarding the debugging of a STM32H745 dual core controller.


      1. Is simultaneous debugging of both cores fully supported/possible?

      It works, more or less, but I noticed some problems:

      e.g. sampling a variable for the timeline data graph with one Ozone instance connected to CM7, while another Ozone instance is connected to CM4, will result in zeros in the graph, and even worse, it will zero the sampled variable in memory.
      In the image you can see how "dwtval_avg" (on-chip calculated average of dwtval) gets reset



      I also had cases, where the debugger (J-link Ultra+ V5.1), lost its firmware while trying to start a debug session and needed to reload it.




      2. what does Ozone do when I click “Download & Reset Program” and why could it fail?
      e.g. right now, I cannot access the CM4, while CM7 works fine
      From console:

      Source Code

      1. Debug.Start();
      2. Device "STM32H745XI_M4" selected.
      3. ConfigTargetSettings() start
      4. ConfigTargetSettings() end - Took 8us
      5. InitTarget() start
      6. SWD selected. Executing JTAG -> SWD switching sequence.
      7. DAP initialized successfully.
      8. Enabling debug in 'Standby', 'Stop' & Sleep mode.
      9. InitTarget() end - Took 21.9ms
      10. Found SW-DP with ID 0x6BA02477
      11. DPIDR: 0x6BA02477
      12. CoreSight SoC-400 or earlier
      13. AP map detection skipped. Manually configured AP map found.
      14. AP[0]: AHB-AP (IDR: Not set)
      15. AP[1]: AHB-AP (IDR: Not set)
      16. AP[2]: APB-AP (IDR: Not set)
      17. AP[3]: AHB-AP (IDR: Not set)
      18. AP[3]: Skipped ROMBASE read. CoreBaseAddr manually set by user
      19. AP[3]: Core found
      20. CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
      21. Found Cortex-M4 r0p1, Little endian.
      22. Cortex-M: The connected J-Link (S/N 5051*****) uses an old firmware module: V2 (current is 3)
      23. FPUnit: 6 code (BP) slots and 2 literal slots
      24. ROM table scan skipped. CoreBaseAddr manually set by user: 0xE00FF000
      25. I-Cache L1: 0 KB, 1 Sets, 16 Bytes/Line, 1-Way
      26. D-Cache L1: 0 KB, 1 Sets, 16 Bytes/Line, 1-Way
      27. Connected to target device.
      28. J-Link/J-Trace serial number: 5051*****)
      29. Reset: Halt core after reset via DEMCR.VC_CORERESET.
      30. Reset: Reset device via AIRCR.SYSRESETREQ.
      31. Elf.GetBaseAddr(); // returns 0x8100000
      32. Target.ReadU32 (0x08100000); // returns 0x4, data is 0x10000600
      33. Target.SetReg ("SP", 0x10000600);
      34. Elf.GetEntryPointPC(); // returns 0x81023CC
      35. Target.SetReg ("PC", 0x81023CC);
      36. Timeout while preparing target, RAMCode did not respond in time!
      37. Failed to perform RAMCode-sided Prepare()
      38. Verification of RAMCode failed @ address 0x24000558.
      39. Write: 0xE7DB4798 69236961
      40. Read: 0xE7DB47A5 69236961
      41. Download failed: J-Link reports an unspecified download error
      42. Elf.GetBaseAddr(); // returns 0x8100000
      43. Target.ReadU32 (0x08100000); // returns 0x4, data is 0x10000600
      44. Target.SetReg ("SP", 0x10000600);
      45. Elf.GetEntryPointPC(); // returns 0x81023CC
      46. Target.SetReg ("PC", 0x81023CC);
      47. Memory map 'after startup completion point' is active
      48. Startup complete (PC=0x08101934)
      49. T-bit of XPSR is 0 but should be 1. Changed to 1.
      Display All
      2a. Does it reset/halt both cores or just one?

      2b. Does it write something to RAM? Because the error above mentions RAMCode

      2c. What could prevent the debugger from debugging? The core must be on, I guess, anything else?
      2d. What is the "T-bit of XPSR" and what does this warning/info mean?

      The post was edited 2 times, last by fraengers ().

    • Hi Fraengers,
      those questions are related to J-Link, not Ozone. Therefore I move this thread to the J-Link forum.
      Best regards
      -- AlexD
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.