Topic: [SOLVED] Ultra low power system
Hello,
we want to integrate the wolfSSL into an ultra low power device where the CPU is held in sleep mode as much as possible. For this reason, everything is interrupt-driven; all threads are blocked by semaphores for an indefinite time otherwise the OS does not permit the CPU to enter into sleep mode. When the connectivity layer receives a data packet, it wakes up the CPU and then the CPU reads the data from the connectivity layer and then wakes a receiving thread that consumes the received data.
I was thinking to register the receive function with the wolfSSL_CTX_SetIORecv(). When needed, WolfSSL will call the ctx->CBIORecv() function and block indefinitely until data is pushed by the connectivity layer.
Is this the right approach to take? Or it is possible to push data into WolfSSL instead of polling for data?
Does wolfSSL_connect() have any means to timeout?
Regards, Peter