Skip to main content
Associate III
May 20, 2024
Solved

Unable to select a TIM timer as Timer Source in a STM32U5 project with TrustZone enabled

  • May 20, 2024
  • 3 replies
  • 1701 views

Hi, I've created a project in STM32CubeIDE 1.14.1 for the Discovery board B-U585I-IOT02A with TrustZone enabled. Unfortunately, I'm unable to select any of the TIM timers as the SYS_NS and SYS time source. They are disabled with the following message: "TIM6 disabled: This IP instance is already used or no context is selected."

However, I activated the TIM6 timer with a Non-secure context enabled.

Thanks in advance for your help!

@STea 

Nouvelle image (26).jpg

Best answer by STea

Hello @SedCore ,

Can you give me the steps you followed or described what did you enable in your IOC file maybe you assigned the timer to be used in another way?
My recommendations would be to:

1-use the latest version of CubeIDE and CubeMX to make sure you get the latest updates and patches.

2-clear the pinout and try to asign the TIM6 to the non-secure world then try selecting it as timebase.

BR 

3 replies

ST Employee
May 20, 2024

Hello @SedCore ,

you need to assign the TIM6 to the NS world in timers to be able to select it as timebase.
Here is a screenshot illustrating this:

STea_0-1716224764542.png

BR

SedCoreAuthor
Associate III
May 20, 2024

@STea thanks for your rapid response. But as you can see on the screenshot that I provided, TIM6 is already assigned to M33NS, but it is grayed out when I try to select it as a Timebase Source for SYS_NS, with the following error being displayed: "TIM6 disabled: This IP instance is already used or no context is selected."

STeaBest answer
ST Employee
May 20, 2024

Hello @SedCore ,

Can you give me the steps you followed or described what did you enable in your IOC file maybe you assigned the timer to be used in another way?
My recommendations would be to:

1-use the latest version of CubeIDE and CubeMX to make sure you get the latest updates and patches.

2-clear the pinout and try to asign the TIM6 to the non-secure world then try selecting it as timebase.

BR 

SedCoreAuthor
Associate III
May 20, 2024

Yes, thank you. I updated the CubeMX version from 6.10 to 6.11.1

Here is one of the release notes I've read in the new version when updating:

  • An error occurs when switching the timebase source from SysTick to a timer for the STM32C0 series

Meaning that it was a problem related to the version 6.10. Now the problem is solved in this new version.

Thanks!!!