2023-07-31 04:56 AM
Hi @channel
I am using the B-U585-IOT2A board based on STM32U585 and am configuring TZEN and checking some sample programs. i am not able to reset the board either through the push button or through the software code "NVIC_System_Reset()" and when debugging am getting a break error as shown below:
The debgug console is returning the error:
On searching the community i found that there is some error in the memory configuration of the secure and non secure area. the linker script i have used is the default one that stmcube mx has generated. the option byte i have used is as below:
The issue is i can run my program only once(functionality works) but neither am i able to reset or run the program again while debugging again.
please assist me in solving the issue.
Awaiting support in this regard
Thanks and Regards
Philip Jose
Solved! Go to Solution.
2023-08-01 05:26 AM
Hi @Pierre_Paris
Thanks for your update
At last was able to find the solution. The problem was the address configured in the NSBOOTADDRESS0. There was a wrong value given. I modified the values to the following:
Now that issue is solved.(SRAM_RST is checked) that was unchecked while testing the TF-M SBSFU Application.
Now i am able to reset the board and is able to debug multiple times. Now the example code and my code is working fine.
Thanks for your valuable support
Philip Jose
2023-07-31 08:47 AM - edited 2023-08-01 07:20 AM
Hello Philip Jose @PJose.4 ,
Thank you for your question, I have listed some points / questions :
Best Regards,
Pierre
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.
2023-07-31 09:57 PM
Hello @Pierre_Paris
Thanks for your update
I am trying one basic TF-M implementation with the following functionality:
1. Secure Peripheral - LED, UART
2. Non Secure Peripheral - LED
3. Secure to Non secure control - Non secure LED control from Secure Code
4. Non Secure to secure (SG ) - Access secure UART from Non secure code
Following is my option byte configuration(boot Configuration)
User Configuration Option Bytes
I am attaching the Linker script for both secure and non secure code.
I have changed the secwm2 option byte value like SECWM2_PSTRT>SECWM2_PEND from information got from the community(Sorry not able to recollect exact reference)
I tested the GPIO_Toggle_TZen code from STM32U5 package with the above configuration.
Please let me know for any other information that is required from my side.
Thanks
2023-07-31 10:03 PM - edited 2023-08-01 12:33 AM
@Pierre_Paris
Attaching the secure and non secure code RAM linker script also.
I have checked the GTZC TZIC values as well. The values are 0. the values are disabled.
I have used the reference code from Stm32 firmware package- official release
en.stm32cubeu5-v1-2-0\STM32Cube_FW_U5_V1.2.0\Projects\B-U585I-IOT02A\Examples\GPIO\GPIO_IOToggle_TrustZone.
The cube MX project also i have just enabled the TZEN bit and not made any changes to the configuration(from the reference code GPIO_IOToggle_TrustZone). Is there any other configuration that i have to do?
Thanks
2023-08-01 05:15 AM
Hello @PJose.4 ,
As the Embedded flash memory (FLASH) chapter of the Reference Manual describe :
Best Regards,
Pierre
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.
2023-08-01 05:26 AM
Hi @Pierre_Paris
Thanks for your update
At last was able to find the solution. The problem was the address configured in the NSBOOTADDRESS0. There was a wrong value given. I modified the values to the following:
Now that issue is solved.(SRAM_RST is checked) that was unchecked while testing the TF-M SBSFU Application.
Now i am able to reset the board and is able to debug multiple times. Now the example code and my code is working fine.
Thanks for your valuable support
Philip Jose