2024-05-24 04:49 AM
Hi,
I'm willing to use the MXCHIP EMW3080B wireless module on the B-U585I-IOT02A in a project with TrustZone enabled. As there is no tutorial for that, I copied files from the Nx_Network_Basics example.
Unfortunately I get the following error when building the Non-Secure project: unknown type name 'noos_queue_t'
Your help will be much appreciated, thanks!
Solved! Go to Solution.
2024-06-28 08:06 AM
Hi @STea ,
I finally found the solution for using the Nx_Basics with TrustZone enabled.
GPDMA channels used for SPI communication with the MXCHIP wi-fi module should be enabled as priviledged. It is not the case with the Nx_Basics example, which is set up without TrustZone.
Thanks for your kind support!
2024-05-24 05:06 AM
@SedCore wrote:I copied files from the Nx_Network_Basics example.
Seems that you omitted to copy the file which defines this type!
You need to go back to the original, and find where it was defined.
Or, perhaps, the definition is there, but is disabled by a #if due to some configuration
In that case, do a text search for "noos_queue_t" through all the source files (both .c and .h) to find where the definition is, and then see what configuration you need to add/change.
2024-05-25 07:15 AM
Hello @SedCore ,
It seems to be that you are missing some .h files which could be forgotten or not been copied manually my recommendation is to start your project based on the ioc files config provided in the NX_Network_Basics with the Trustzone activated and the BSP and middleware component assigned to the correct world (secure /non secure) because some of the include files could be referenced in the drivers folder of the repository containing the example and not copied in the project itself so instead of copying you should set the same paths found in that project to get reed of these problems.
Here are the paths that should be set
BR
2024-05-25 11:01 AM
my recommendation is to start your project based on the ioc files config provided in the NX_Network_Basics with the Trustzone activated
@STea NX_Network_Basics is by default a project with TrustZone disabled. How to convert it into a project with TrustZone enabled?
BR.
2024-05-26 08:29 AM
Hello @SedCore ,
you cannot convert it to a project with Trustzone enabled you can instead begin a new project with TZ enabled then try to mimic the same configuration found in the other project with the added component of peripherals and middleware assignment to the secure or the non-secure world.
BR
2024-06-24 06:52 AM - edited 2024-06-25 07:04 AM
Hello @STea ,
try to mimic the same configuration found in the other project with the added component of peripherals and middleware assignment to the secure or the non-secure world.
I followed this recommendation, but the Wi-Fi interface cannot connect. I get the following error:
This error is raised from the following file:
[My project]\Drivers\BSP\Components\mx_wifi\io_pattern\mx_wifi_spi.c
Your kind help would be much appreciated. @Andrew Neil
BR.
2024-06-25 07:09 AM
Hello @SedCore
After a quick look to this file, it seems like you SPI Wi-Fi module are not responding correctly to the command it is expected to receive.
make sure that you can see data sent to the module with a logic analyzer or a scope if you cannot visualize the Data make sure you are assigning the security attributes for the SPI instance in use to the correct world, I assume it is the non-secure world.
check also for the gpio security attributes.
Regards
2024-06-27 09:45 AM
Hi @STea ,
The security attributes are already correctly assigned for the SPI instance in the non-secure world, as per the below screenshot.
2024-06-28 08:06 AM
Hi @STea ,
I finally found the solution for using the Nx_Basics with TrustZone enabled.
GPDMA channels used for SPI communication with the MXCHIP wi-fi module should be enabled as priviledged. It is not the case with the Nx_Basics example, which is set up without TrustZone.
Thanks for your kind support!
2024-06-28 08:59 AM
Hello @SedCore ,
glad to hear that you found a solution for this. I 'll try to prepare a small FAQ summarizing the problem and your solution. this is mentioned in general in AN5347 in section 11.2 Using non-secure peripherals.
Regards