cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32f407igt6

sanjib
Associate III
Posted on July 22, 2014 at 12:31

I have configured the clock for 168 mhz and for tim2 84 mhz , presaclar = 2 and arr = 200

it is showing 4.6 us in stm32f407vgt6...but in stm32f407igt6 it is showing 24 us .....I have checked the system_init actually it is not entering into the  if ((RCC->CR & RCC_CR_HSERDY) != RESET) ....to proceed  for HSEStatus = (uint32_t)0x01; it is always entering  HSEStatus = (uint32_t)0x00; this might be the problem how to solve it....I have referred one link but also didn't give me any success

the link is given below:

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FHSE%20can%20not%20be%20ready%20at%20debug&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=504

I am using coocox please help why it is not enabling the HSE please help
7 REPLIES 7
sanjib
Associate III
Posted on July 22, 2014 at 12:52

NOTE:::: I am using PLL to set the clock config is as follows

*=============================================================================

  *=============================================================================

  *        Supported STM32F4xx device revision    | Rev A

  *-----------------------------------------------------------------------------

  *        System Clock source                    | PLL (HSE)

  *-----------------------------------------------------------------------------

  *        SYSCLK(Hz)                             | 168000000

  *-----------------------------------------------------------------------------

  *        HCLK(Hz)                               | 168000000

  *-----------------------------------------------------------------------------

  *        AHB Prescaler                          | 1

  *-----------------------------------------------------------------------------

  *        APB1 Prescaler                         | 4

  *-----------------------------------------------------------------------------

  *        APB2 Prescaler                         | 2

  *-----------------------------------------------------------------------------

  *        HSE Frequency(Hz)                      | 8000000

  *-----------------------------------------------------------------------------

  *        PLL_M                                  | 8

  *-----------------------------------------------------------------------------

  *        PLL_N                                  | 336

  *-----------------------------------------------------------------------------

  *        PLL_P                                  | 2

  *-----------------------------------------------------------------------------

  *        PLL_Q                                  | 7

  *-----------------------------------------------------------------------------

  *        PLLI2S_N                               | NA

  *-----------------------------------------------------------------------------

  *        PLLI2S_R                               | NA

  *-----------------------------------------------------------------------------

  *        I2S input clock                        | NA

  *-----------------------------------------------------------------------------

  *        VDD(V)                                 | 3.3

  *-----------------------------------------------------------------------------

  *        Main regulator output voltage          | Scale1 mode

  *-----------------------------------------------------------------------------

  *        Flash Latency(WS)                      | 5

  *-----------------------------------------------------------------------------

  *        Prefetch Buffer                        | OFF

  *-----------------------------------------------------------------------------

  *        Instruction cache                      | ON

  *-----------------------------------------------------------------------------

  *        Data cache                             | ON

  *-----------------------------------------------------------------------------

  *=============================================================================

  **************
Posted on July 22, 2014 at 15:27

Ponder why the external crystal would not start?

Not connected properly, electrical characteristics of the circuit are wrong, you have an external source and need to use bypass mode?
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
sanjib
Associate III
Posted on July 23, 2014 at 08:51

Yes you are right the external crystal oscillator is not connected.....but when I am connecting the external crystal oscillator it is giving error like

Error: Flash driver function execute timeout.

I have pasted the schematics for the connection of Exernal crystal oscillator to PH0 and PH1,If I disconnect the resistor R362 which is connected to external oscillator , the code is getting downloaded but it is taking the internal oscillator.

And if I connect the R362 then I am not able to dump the code

getting error like

Error: Flash driver function execute timeout.

________________

Attachments :

Untitled.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0jY&d=%2Fa%2F0X0000000bd7%2F9Oe7a84FaUoonqTopjzPPLuCbCQSOAbRq4_2TJ8cprQ&asPdf=false
Posted on July 23, 2014 at 14:32

If the external clock is 25 MHz, perhaps you should modify the PLL settings to reflect that, and not the 8 MHz settings you have now? Adjust also HSE_VALUE

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
sanjib
Associate III
Posted on July 24, 2014 at 12:29

Yes I have done it.........but still the problem exists ...it is still taking the internal oscillator ....Now I am able to connect the external osc by using 200k resistor before I was using 10 k resistor so the code was not dumping now the code is getting dumped by changing it to 200k....

but even after it is connected it is behaving same .. I am not able to see any sine wave across the ext osc.
sanjib
Associate III
Posted on July 25, 2014 at 06:20

please  reply

Posted on July 25, 2014 at 07:34

Probing it directly is likely to interfere with the characteristics of the circuit, you should be able to look at the HSE and PLL indirectly via the MCO pin (PA8) and configuring that to output internal clock signals.

You can also run the part from the HSI (16 MHz), and PLL clocks generated from the HSI.

You need to evaluate why the HSE isn't starting properly. You want to look at the component values and specs, an how the circuit is laid out. Confirm the capacitors are the correct values.

HC-49S-C16QSA-25M

http://search.alkon.net/cgi-bin/pdf.pl?pdfname=05616.pdf

-20 to +70 C

16pF Load Capacitance

Frequency Tolerance  +/-20*10-6

Frequency Stability +/- 30*10-6

AT Fundamental

25 MHz

CC0603JRNPO9BN200

Yageo Multilayer Ceramic Capacitors MLCC - SMD/SMT 20PF 50V 5% 0603</span>

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..