TC4xx promo banner Banner_Aurix_Competition Banner_AURIX_Security-Solution Banner_AURIX_Safety_Products ShieldBuddy TC275 Banner_AURIX_DevelopmentStudio


+ Reply to Thread
Results 1 to 8 of 8

Thread: Running HSM core without debugger

  1. #1
    Beginner Beginner omerkayten is on a distinguished road
    Join Date
    Apr 2021
    Posts
    11
    Points
    150

    Running HSM core without debugger

    Hello,

    We use TC332L as an MCU. And we use Tricore and HSM core together. Our project works fine with debugger. But it doesn't work without debugger.
    Are there any settings or configurations in HSM core to work without debugger?

  2. #2
    Advanced Advanced
    Infineon Employee
    Infineon Employee
    MoD is on a distinguished road
    Join Date
    Feb 2012
    Location
    Munich
    Posts
    270
    Points
    5449.375
    What is not working without debugger?
    State of ESR0 (reset)?
    Common errors in such cases are:
    Invalid or no BMHD programmed (ESR0 is always high)
    Problems with any watchdog (ESR0 goes 2 times to high for short time hen stays always on low)
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  3. #3
    Beginner Beginner omerkayten is on a distinguished road
    Join Date
    Apr 2021
    Posts
    11
    Points
    150
    Quote Originally Posted by MoD View Post
    What is not working without debugger?
    State of ESR0 (reset)?
    Common errors in such cases are:
    Invalid or no BMHD programmed (ESR0 is always high)
    Problems with any watchdog (ESR0 goes 2 times to high for short time hen stays always on low)
    When we detached debugger from iSystem's winIDEA,(to simulate the without debugger scenario) our HSM code is working properly. In our code, we apply Tricore Core0 application reset, again HSM is working.
    But when debugger is detached, we apply power off/on, the HSM code is not working. In this scenario it seems HSM core not started yet. After power off/on, it seems HSM core stucks at some hardware breakpoint.
    We have two winIDEA workspaces one for Tricore and one for HSM core. To be able to start the HSM core, we click Start button(green arrow button) in winIDEA HSM workspace. And in status window of winIDEA it says STOP-BKPT with green line.
    So we came to the idea that when we apply the power off/on, it seems that HSM core stucks at this STOP-BKPT and do not pass this, so our code is not working.

    Also we learned that there is onchip breakpoint set by the boot ROM which blocks the execution of HSM core. Maybe this is the problem but we don't know how to solve this issue.

  4. #4
    Advanced Advanced UC_wrangler will become famous soon enough
    Join Date
    Jun 2019
    Posts
    508
    Points
    10560
    Quote Originally Posted by omerkayten View Post
    Also we learned that there is onchip breakpoint set by the boot ROM which blocks the execution of HSM core. Maybe this is the problem but we don't know how to solve this issue.
    Exactly right. Try a winIDEA initialization script like this:
    // Start the HSM from the TriCore side without opening HSM instance
    A 0xF0041010 L 0xE0000000 // set HSM DBGBASE register to E000
    A 0xF0052008 L 0x00000000 // for deleting the onchip breakpoint set by the boot ROM. Without deleting the onchip breakpoint, the HSM won't start.

  5. #5
    Beginner Beginner omerkayten is on a distinguished road
    Join Date
    Apr 2021
    Posts
    11
    Points
    150
    Quote Originally Posted by UC_wrangler View Post
    Exactly right. Try a winIDEA initialization script like this:
    Thanks for reply.

    Where should we place these configurations in our project. We can't put these configurations in Core0 user code because SSW, waits for acknowledge (if SSWWAIT is enabled in HSM) from HSM to start the application cores. Therefore, HSM must run first before application cores.

  6. #6
    Advanced Advanced UC_wrangler will become famous soon enough
    Join Date
    Jun 2019
    Posts
    508
    Points
    10560
    That's a winIDEA initialization script. Save it to an ini file and put it in CPU Setup / Initialization before Debug session / Initialize.

  7. #7
    Beginner Beginner omerkayten is on a distinguished road
    Join Date
    Apr 2021
    Posts
    11
    Points
    150
    Quote Originally Posted by UC_wrangler View Post
    That's a winIDEA initialization script. Save it to an ini file and put it in CPU Setup / Initialization before Debug session / Initialize.
    But our problem is not with debugger. The problem is our code doesn't work without debugger. As I said before, it seems HSM core does not start when we work without debugger.
    Where we can put these configurations in our source codes, to delete onchip breakpoint which starts the HSM core when debugger is not attached. I mean our board is running standalone, so there is no debugger attached.
    Last edited by omerkayten; Jun 10th, 2021 at 07:33 AM.

  8. #8
    Advanced Advanced UC_wrangler will become famous soon enough
    Join Date
    Jun 2019
    Posts
    508
    Points
    10560
    Sorry - that initialization script is such a common problem when debugging that I misunderstood your problem.

    There is no HSM breakpoint set when there's no debugger.

    Could it be that your HSM software has some dependency on the TriCore doing something first? Without the debugger connected, both cores will start at the same time, unless you have PROCONHSMCFG.SSWWAIT set.

    Could it be that PROCONHSMCFG.SSWWAIT is set, and the HSM is not eventually setting HSM2HTF=1? If the HSM waits too long, a watchdog will occur, causing the system to reset.

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.