cancel
Showing results for 
Search instead for 
Did you mean: 

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

SedCore
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions

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 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
STea
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
SedCore
Associate III

@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."

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 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
SedCore
Associate III

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!!!