Hi Kevin,
Thank you for your reply. It turned out to be the configuration problems of this peripheral.
Best Regards, Poppy Wu
Kevin Peng via TF-M tf-m@lists.trustedfirmware.org Sent by: "TF-M" tf-m-bounces@lists.trustedfirmware.org 2021/07/28 13:58 Please respond to Kevin Peng Kevin.Peng@arm.com
To Edward Yang EdwardYang@mxic.com.cn cc "tf-m@lists.trustedfirmware.org" tf-m@lists.trustedfirmware.org Subject Re: [TF-M] spi peripheral doesn't work in secure world
Hi Poppy,
Mmio_regions is required for Secure Partitions to access peripherals, even though in some cases it would work without mmio_regions declaration.
Could you please provide more information such as what’s your build configuration and what’s the type of your Secure Partition? Have you put the driver codes into the Secure Partition’s library in the TF-M build system? Are you seeing any exceptions or errors?
Best Regards, Kevin
From: TF-M tf-m-bounces@lists.trustedfirmware.org On Behalf Of Edward Yang via TF-M Sent: Wednesday, July 28, 2021 11:23 AM To: tf-m@lists.trustedfirmware.org Subject: [TF-M] spi peripheral doesn't work in secure world
Hi experts,
We are running Arm TF-M on stm32l562e_dk board, and we add a new secure partition based on TF-M architecture according to our specific application.In this new secure partition ,spi peripheral is used to communicate with a external spi nor flash.
If we just test the spi driver in non-secure world(without tf-m),it works well.
Then we put this driver in secure world,it's a plarform driver used by this new secure partition,and we have configured the spi peripheral as secure peripheral in gtzc_init_cfg() inside tfm_core_init().
We used a logic analyzer to debug, and found there was no spi communication waveform, it seems that this peripheral doesn't work in secure world,. We didn't declare this new partition's dependency on spi peripheral in its manifest files with mmio_regions. And I am not sure whether this is why the spi peripheral doesn't work. Is there anything else that we should pay attention to?
Best Regards, Poppy Wu
Macronix Microelectronics (Suzhou) Co.,Ltd http://www.mxic.com.cn CONFIDENTIALITY NOTE: This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as its attachment(s) from your system. In addition, please be informed that collection, processing, and/or use of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation. Macronix International Co., Ltd. =====================================================================-- TF-M mailing list TF-M@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-m
============================================================================
CONFIDENTIALITY NOTE:
This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as its attachment(s) from your system. In addition, please be informed that collection, processing, and/or use of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation.
Macronix International Co., Ltd.
=====================================================================
tf-m@lists.trustedfirmware.org