Author Topic: Need Help with STM32F407 Design  (Read 1833 times)

0 Members and 1 Guest are viewing this topic.

Offline jasons520Topic starter

  • Newbie
  • Posts: 6
  • Country: au
Need Help with STM32F407 Design
« on: April 27, 2018, 03:34:24 am »
Hi Everyone,
I have a project that i am completing, A sort of wireless version of Ambilight using the stm32f407, however, this is my first time developing a pcb for the STM32 series of processors and its a little bit out of my depth. I am wondering, will i need a usb for firmware upgrade, or can i complete it just using ST-Link using JTAG, and is my design appropriate for the development of the STM32? Or is there issues with it?

Thanks everyone in advance!
 

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 680
  • Country: us
Re: Need Help with STM32F407 Design
« Reply #1 on: April 27, 2018, 04:07:39 am »
I'm not completely sure, but I think NRST needs a pull-up resistor.

It's easiest to flash the board using a st-link. In fact, usually you have to use to use the st-link at first to flash it (I don't think the ROM bootloader supports USB, though you could use thebootloader's uart mode).

Add some extra IO debug testpoints, maybe a LED and a serial port header, too.

I don't know much about your chip, but you may want to put all of the inputs from the video chip into a single port.
« Last Edit: April 27, 2018, 04:12:51 am by pigrew »
 

Offline llkiwi2006

  • Regular Contributor
  • *
  • Posts: 105
  • Country: nz
Re: Need Help with STM32F407 Design
« Reply #2 on: April 27, 2018, 05:29:24 am »
I'm not completely sure, but I think NRST needs a pull-up resistor.

The chip has internal pull up on NRST.
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: Need Help with STM32F407 Design
« Reply #3 on: April 28, 2018, 01:18:03 am »
That schematic is difficult to read, which increases the chances of making a mistake.

There's a 2k2 pullup resistor for SCL, but I couldn't find one for SDA.

With STM32 the MCO signal an output from the clock system. It's not simply one of the crystal pins as shown in this schematic.

You don't need all the JTAG signaling with resistors and such. SWD is simpler.
 

Offline Lt_Flash

  • Regular Contributor
  • *
  • Posts: 78
  • Country: au
Re: Need Help with STM32F407 Design
« Reply #4 on: April 29, 2018, 06:11:51 pm »
SWD requires only SWDIO, SWCLK and RESET (inverted), so really - much easier. 2.2kOhm for I2C seems to be an overkill, 4.7kOhm on SDA and SCL is usual, or even 10kOhm is quite standard.
 

Offline Lt_Flash

  • Regular Contributor
  • *
  • Posts: 78
  • Country: au
Re: Need Help with STM32F407 Design
« Reply #5 on: April 29, 2018, 06:16:30 pm »
Also, why is there a 14.31818MHz oscillator? With some resistor between pins? Why 20pF? Was it calculated somehow? What type of crystal is that? Usually you calculate these capacitors based on datasheet, something like this (copied from SAML21 datasheet):

Crystal Oscillator Characteristics
The following Table describes the characteristics for the oscillator when a crystal is connected between
XIN and XOUT.

The user must choose a crystal oscillator where the crystal load capacitance CL is within the range given
in the Table. The exact value of CL can be found in the crystal datasheet. The capacitance of the external
capacitors (CLEXT) can then be computed as follows:
CLEXT = 2(CL - CSTRAY - SHUNT) ,
where CSTRAY is the capacitance of the pins and the PCB, and CSHUNT is the shunt capacity of the crystal.
 

Offline Lt_Flash

  • Regular Contributor
  • *
  • Posts: 78
  • Country: au
Re: Need Help with STM32F407 Design
« Reply #6 on: April 29, 2018, 06:19:53 pm »
I would really recommend to copy-and-paste most of the parts of this evaluation board schematic for this MCU if you're just a beginner and not really sure what you're doing, would save you a lot of time and effort! :)

http://www.st.com/content/ccc/resource/technical/document/user_manual/25/21/69/1d/13/c5/4e/c9/DM00036746.pdf/files/DM00036746.pdf/jcr:content/translations/en.DM00036746.pdf
 

Offline Lt_Flash

  • Regular Contributor
  • *
  • Posts: 78
  • Country: au
Re: Need Help with STM32F407 Design
« Reply #7 on: April 29, 2018, 06:22:06 pm »
Pay attention to all the bypass capacitors at VDD_MCU pins, they're there for reason!
 

Offline jasons520Topic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Need Help with STM32F407 Design
« Reply #8 on: April 30, 2018, 08:13:34 am »
Hi everyone, Thanks so much for your replies!
Some follow ups;
The 14.31818MHz oscillator is for the TVP5150 video decoder - the schematic for it is based on its data sheet.
I will update to use SWD, I'm quite confused when reading the datasheets, and ST-link for programming.
I will copy the discovery boards schematic to work everything else out.

The video decoder chip is using STM's dcmi on the chip. - its controlled via the I2C interface.
Im using SPI for wireless control via a NRF24l01+ module.

My main question is, do i just need the ST-link and SWD for programming the board, or do i need a usb port or something like that?

Thanks everyone!
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: Need Help with STM32F407 Design
« Reply #9 on: April 30, 2018, 08:46:24 am »
My main question is, do i just need the ST-link and SWD for programming the board, or do i need a usb port or something like that?
SWD/ST-Link is used for putting code on the board and also for debugging. There are various bootloaders in ROM that can also be used to reprogram the device from a serial connection like USB, UART, etc. However, those won't help at all with debugging. If you want to try the serial bootloaders, read up on AN-2606 and make sure you can reconfigure BOOT0 and BOOT1 as necessary.

I use a TC-2030 footprint on all my ARM mcu boards with the standard SWD pinout. It doesn't take much space and once you buy the cable, there's no need for putting a special connector on each project--it's just a PCB footprint.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf