This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using printf to print out debug message

Hello,
I am learning to program STM32F4 based micro controller(using STM32F429ZI DISC1 board). I am trying to use printf function to print out debug message. I have used following sources as reference and nothing worked for me

" href= "www.youtube.com/watchwww.youtube.com/watch

www.silabs.com/.../how_to_display_print-Ly1m

This is my code

#include "stm32f4xx.h"
#include <stdio.h>

int msTicks = 0;
void SysTickHandler()
{
    msTicks++;
}

int fputc(int ch, FILE *f)
{
  ITM_SendChar(ch);
  return(ch);
}

int main(void)
{
    // Get the core clock frequency
    SystemCoreClockUpdate();

    if(SysTick_Config(SystemCoreClock/1000))                    // SysTick 1 ms interrupts
    {
        while(1);                                                                               // Capture error
    }

    printf("LED ON\r\n");
    while(1)
    {

    }
    return 0;
}


I have checked my core clock frequency, it's 16 MHz
Did as shown in this thread
www.keil.com/.../uv4_db_dbg_printf_viewer.htm

Screen shots
" href= "drive.google.com/.../view drive.google.com/.../view

Am I missing something??

Also what is that Xtal clock frequency in Options for Target >> Target >> Xtal if I'm using internal RC oscillator.

Thnaks