Skip to main content
Visitor II
October 8, 2024
Solved

The Read Data is always "0" in STM32H5 MCU

  • October 8, 2024
  • 1 reply
  • 1363 views

Dear Sir, 
I've been using CubeMonitor to monitor data for quite a while, and it really is a convenient tool.
I recently started developing a new system with new MCU, STM32H5.
However, when I use CubeMonitor to monitor the data, the data remains 0 all the time, as shown in the image.

yang2_0-1728366982485.png

I have checked the variable in the IDE, and the variables indeed have normal values.

yang2_1-1728367060122.png

I'm not sure if this is related to the STM32H5, because when I was using the STM32F3 before, everything was working fine.

 

I also used the NUCLEO-F303RE and NUCLEO-H563ZI to verify this issue.

yang2_3-1728367467818.pngyang2_2-1728367449981.png

I create a simple accurmated counting program, and on the F303, everything works fine.
But on the H563, the data always remains 0.

yang2_4-1728367537786.png

yang2_5-1728367638409.png

yang2_6-1728367725600.png

Does anyone know what might be causing this issue?

Best Regards,

 

 

 

    This topic has been closed for replies.
    Best answer by

    I have noticed this post with same issue

    https://community.st.com/t5/stm32cubemonitor-mcus/stmcubemonitor-doesn-t-work-with-stm32h503/m-p/704978#M1221

     

    By changing the Access port to 1, it works correctly now.

    yang2_0-1728368250169.png

     

    Can I ask another question?

    What's the meaning of this setting for access port?

     

    1 reply

    Answer
    October 8, 2024

    I have noticed this post with same issue

    https://community.st.com/t5/stm32cubemonitor-mcus/stmcubemonitor-doesn-t-work-with-stm32h503/m-p/704978#M1221

     

    By changing the Access port to 1, it works correctly now.

    yang2_0-1728368250169.png

     

    Can I ask another question?

    What's the meaning of this setting for access port?

     

    ST Employee
    October 8, 2024

    Hello @yang2 

    STM32CubeMonitor use debug access port to retrieve the data inside the STM32.

    Some devices have multiple debug access ports. It can be either because they have multiple cores or because some cores have multiple ports with different purposes (i.e. secure debug).

    If the wrong access port is used, the variable is usually returned as 0.

    The settings in the "variables node" indicates which access port must be used. In case of multicore chip, you may have two "variables nodes" with different A.P., to be able to read variables on both core with a single ST-Link connection.  

    On the older single core STM32, the Access Port used was usually the port 0. But on more recent architecture, the port 1 is used more often. 

    So when it is not working on port 0, it is good to try with port 1.

     

    In case of H563, here is an extract of the Reference Manual :

    59.4 Access ports

    There are two access ports (AP) attached to the DP.
    • System debug access port (AP0): Enables access to the DBGMCU and the system
    ROM table via an APB bus.
    • Cortex®-M33 debug access port (AP1): Enables access to the debug and trace
    features integrated in the Cortex®-M33 processor core via its internal AHB bus.

    We need to access the variables through AHB bus, so for H563 , the access port AP1 must be used.

     

    Best regards

     

    October 9, 2024

    Hi, Stephane, 

    I totally understand via your reply.

    This is a good explanation. I am very grateful