Tfm Driver [ Must Read ]
#include "psa/service.h" #include "my_sensor_driver.h" psa_signal_t signals = 0;
while (1) signals = psa_wait(PSA_WAIT_ANY, BLOCKING); if (signals & MY_SENSOR_READ_SIGNAL) psa_msg_t msg; psa_get(MY_SENSOR_READ_SIGNAL, &msg); int32_t temp; my_sensor_read(&temp); psa_write(msg.handle, 0, &temp, sizeof(temp)); psa_reply(msg.handle, PSA_SUCCESS); tfm driver
To allow Non-Secure access, set non_secure_clients: true in the manifest. Then generate veneers. Non-secure client code: #include "psa_manifest/sid.h" // Auto-generated #include "my_sensor_partition_veneers.h" void app_main() int32_t temp; psa_status_t status = my_sensor_read(&temp); if (status == PSA_SUCCESS) printf("Temp: %d\n", temp); #include "psa/service















