Console on secure side is retargeted to CMSIS USART driver (./platform/ext/common/uart_stdout.c).
USART driver Send function is called also from SVC with highest interrupt priority which blocks the USART interrupt and leads to deadlock. This is not manifested with Musca USART drivers which implement blocking send - not compliant with CMSIS USART Driver. It does occur instantly with any other CMSIS compliant USART driver.
As far as I understand the console on secure side will be redesigned to cope with that.
There are also other issues with using the USART driver:
- missing wait while busy after send
- missing power on/off
This is being address with:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/1409/7/platform/ext/common/uart_stdout.c
It also tries to address printf retargeting issues however this needs another iteration.
Console on non-secure side is also retargeted to CMSIS USART driver (./app/main_ns.c) however has less constrains.
It has the same issues with using the USART driver:
- missing wait while busy after send
- missing power on/off
This is being address with:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/1409/7/app/main_ns.c
It also tries to address printf retargeting issues however this needs another iteration.