aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/atmel_softpack_libraries/libchip_sam3s/source/exceptions.c
diff options
context:
space:
mode:
authorKévin Redon <kredon@sysmocom.de>2018-08-02 15:02:05 +0200
committerKévin Redon <kredon@sysmocom.de>2018-08-04 11:16:13 +0200
commit1836ac076167f6975b5e46a48de9d00e929e4fef (patch)
treeffc5becf8828bd6173c2ce141eceff0a0ce08f98 /firmware/atmel_softpack_libraries/libchip_sam3s/source/exceptions.c
parentdd36d9b0100053c7d42fe950d5033ad01ba8d196 (diff)
add synchronous UART transmission and use it in exceptions
The default ISR (particularly the HardFault handler) print information, but this information was not displayed on the console because the UART IRQ is lower than some default blocking IRQ. Allowing to set synchronous transfer corrects this. The underlying Atmel exception library had to be modified to use the synchronous output. Making UART_PutChar always synchronous when called from an ISR is not desired because we use TRACE_ macros is some ISR. The synchronous output must be set explicitly. Change-Id: I1b4ace5185cf2dc32684934ed12bf6a8682e9bad
Diffstat (limited to 'firmware/atmel_softpack_libraries/libchip_sam3s/source/exceptions.c')
-rw-r--r--firmware/atmel_softpack_libraries/libchip_sam3s/source/exceptions.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/atmel_softpack_libraries/libchip_sam3s/source/exceptions.c b/firmware/atmel_softpack_libraries/libchip_sam3s/source/exceptions.c
index 74e0fbd..6d2a135 100644
--- a/firmware/atmel_softpack_libraries/libchip_sam3s/source/exceptions.c
+++ b/firmware/atmel_softpack_libraries/libchip_sam3s/source/exceptions.c
@@ -2,6 +2,7 @@
* ATMEL Microcontroller Software Support
* ----------------------------------------------------------------------------
* Copyright (c) 2009, Atmel Corporation
+ * Copyright (c) 2018, sysmocom -s.f.m.c. GmbH, Author: Kevin Redon <kredon@sysmocom.de>
*
* All rights reserved.
*
@@ -41,6 +42,7 @@
* Headers
*----------------------------------------------------------------------------*/
+#define printf printf_sync
#include "chip.h"
/*----------------------------------------------------------------------------