Hi Cristiano,
Peripheral are platform-specific sources. SPM binds the partition specific hardware by the HAL API
tfm_hal_bind_boundaries() when the partition is getting loaded. Hence you need to make sure the platform binding is successful.
The reference mechanism in the code base helps the binding by define available peripheral list in the platform, you can check these points:
You could refer from AN521 platform to see how these things are set.
The above settings also apply to other peripherals, change the name and associate it to the correct peripheral.
Regards,
Mingyang
From: TF-M <tf-m-bounces@lists.trustedfirmware.org>
On Behalf Of Cristiano Rodrigues via TF-M
Sent: Sunday, September 26, 2021 1:25 AM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] Request Access To a Board Peripheral for a App RoT - Problem
Hi everyone,
I'm trying to access an STM32L552 peripheral in a RoT APP (tf-m isolation v1.4 Level 2), but I'm having trouble doing that.
I know that I have to request the peripheral in the YAML file of my partition's manifest, but that request didn't work for me. I filled the required campus and couldn't get access to the peripheral. I'm requesting the peripheral by putting
this piece of code in my partition manifest YAML file. Am I missing something?
.....
"mmio_regions" : [
{
"name": "TFM_PERIPHERAL_TIMER0",
"permission": "READ-WRITE"
}
......
Another thing, I am only able to request the TIMER0 and UART peripherals? If I want to access other timers, e.g., TIMER 6 or TIMER 7, am I not allowed to do so?
Cheers,
Cristiano