7 years, 4 months ago.

SX1276PingPong code cause Hardfault with printf()

I exported SX1276PingPong to STM32F103RB-Nucleo, Keil MDK4. The code works for SPI and GPIO.

Since semihost doesn't work for me, I disabled all semihost debug and replace them with more traditional serial port for debug.

main.cpp

Serial pc(USBTX, USBRX);

main(){
    ......
    pc.printf("debug\r\n");
    ......
}

Then the modified code generates HARDFAULT. So far I can not locate the root cause. Why a simple UART communication will lead to HARDFAULT ?

did you find the answer ? I am having the same fault in Keil uV5

posted by Nick Marsh 12 Jan 2017
Be the first to answer this question.