aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Narkevitch <ainh@cypress.com>2020-01-14 17:32:00 -0800
committerDavid Hu <david.hu@arm.com>2020-01-23 01:47:17 +0000
commit6dff309e22a174b0c58fe02e8668b33ee999cf7d (patch)
tree7cce697ea9ebd192221a22c7ef418e472b7d5579
parent4a385a53555234d8388bf2e53a2f25214e3638a7 (diff)
downloadtrusted-firmware-m-6dff309e22a174b0c58fe02e8668b33ee999cf7d.tar.gz
Platform: fix CM0P not printing debug messages (psoc64)
All existing CMSIS UART drivers do not implement the new functionality introduced by https://review.trustedfirmware.org/c/trusted-firmware-m/+/2489 Adjust psoc64 UART driver to behave the same as the rest of the drivers. Signed-off-by: Andrei Narkevitch <ainh@cypress.com> Change-Id: I7b40891ef22166bd128d689b885f5594def27a28
-rw-r--r--platform/ext/target/cypress/psoc64/CMSIS_Driver/Driver_USART.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/ext/target/cypress/psoc64/CMSIS_Driver/Driver_USART.c b/platform/ext/target/cypress/psoc64/CMSIS_Driver/Driver_USART.c
index 9443f8895..71032a2cf 100644
--- a/platform/ext/target/cypress/psoc64/CMSIS_Driver/Driver_USART.c
+++ b/platform/ext/target/cypress/psoc64/CMSIS_Driver/Driver_USART.c
@@ -323,10 +323,6 @@ static int32_t ARM_USARTx_Control(UARTx_Resources* uart_dev, uint32_t control,
cy_en_scb_uart_status_t cy_retval;
uint32_t retval;
- Cy_SCB_UART_Disable(uart_dev->base, NULL);
-
- Cy_SCB_UART_DeInit(uart_dev->base);
-
switch (control & ARM_USART_CONTROL_Msk) {
case ARM_USART_MODE_ASYNCHRONOUS:
/* TODO Default values work for 115200 baud,
@@ -339,6 +335,10 @@ static int32_t ARM_USARTx_Control(UARTx_Resources* uart_dev, uint32_t control,
return ARM_DRIVER_ERROR_UNSUPPORTED;
}
+ Cy_SCB_UART_Disable(uart_dev->base, NULL);
+
+ Cy_SCB_UART_DeInit(uart_dev->base);
+
/* UART Data bits */
retval = USARTx_SetDataBits(control, &config);
if (retval != ARM_DRIVER_OK)