AnsweredAssumed Answered

STM32F407VG_Discovery IAR printf() console

Question asked by McCrory.Joshuah on Sep 2, 2016
Hey Guys, i'm using the printf() to console to debug basic issues as i'm integrating an STM32F407VG_Discovery with an X-NUCLEO-IHMO2A1. In the dspin libraries to set the clocks for communicating with the L6470 Motor Driver. 

my program is getting stuck after i select PLL as a system clock source.

i'm placing print statements after each point. And it stops printing after i run the function below.

any thoughts what might be causing the program to stick?

I'm doing this in the IAR IDE. The clock LED still cycles, but any additional print statements do not print.

 RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);

where

#define RCC_SYSCLKSource_PLLCLK          ((uint32_t)0x00000002)







void RCC_SYSCLKConfig(uint32_t RCC_SYSCLKSource)
{
  uint32_t tmpreg = 0;
printf("INSIDE\n"); //111
  /* Check the parameters */
  assert_param(IS_RCC_SYSCLK_SOURCE(RCC_SYSCLKSource));
printf("asserted\n");//1111
  tmpreg = RCC->CFGR;
printf("1\n");//11111
  /* Clear SW[1:0] bits */
  tmpreg &= ~RCC_CFGR_SW;
printf("2\n");//1111
  /* Set SW[1:0] bits according to RCC_SYSCLKSource value */
  tmpreg |= RCC_SYSCLKSource;
printf("3\n");//1111
  /* Store the new value */
  RCC->CFGR = tmpreg;
printf("4\n");//111
}

Outcomes