Hello! In the chapter 4 of SDK Developer Manual there is an instruction how to printf debug info on any GPIO. Here are my defines
(app_cfg.h)
#define UART_PRINTF_MODE 1
#define BAUDRATE 1000000
(board_custom.h included in app_cfg.h)
#if UART_PRINTF_MODE
#define DEBUG_INFO_TX_PIN GPIO_PB1//print
#endif
I've put "printf("some text")" in timer callback( which works), but no debug info coming out from GPIO_PB1 pin.
Also I have a warning on each printf "statement with no effect".
Are there some more defines to use debug printf, or maybe project settings? Or may be not every pin can be a debug output?
P.S. i'm using TLSR8258, SDK V3.6.5.0
Data send status |
ZigBee multicast |
New project |
Try to include u_printf.h as shown in sample below,
#define UART_PRINT_DEBUG_ENABLE 1
#if (UART_PRINT_DEBUG_ENABLE)
//the baud rate should not bigger than 1M(system timer clock is constant 16M)
#define PRINT_BAUD_RATE 1000000
#define DEBUG_INFO_TX_PIN GPIO_PB2
#define PULL_WAKEUP_SRC_PB2 PM_PIN_PULLUP_10K
#define PB2_OUTPUT_ENABLE 1
#define PB2_DATA_OUT 1 //must
#include "application/print/u_printf.h"
#endif
Thank you! i've already solved the problem.
@halakvyas
There are no other steps, but it's recommended that clean and recompile the project if you modify the .h files.
Try to include u_printf.h as shown in sample below,
#define UART_PRINT_DEBUG_ENABLE 1
#if (UART_PRINT_DEBUG_ENABLE)
//the baud rate should not bigger than 1M(system timer clock is constant 16M)
#define PRINT_BAUD_RATE 1000000
#define DEBUG_INFO_TX_PIN GPIO_PB2
#define PULL_WAKEUP_SRC_PB2 PM_PIN_PULLUP_10K
#define PB2_OUTPUT_ENABLE 1
#define PB2_DATA_OUT 1 //must
#include "application/print/u_printf.h"
#endif
Thank you! i've already solved the problem.
@halakvyas