STM32F429 discovery board—-STM32F429IGT6

STM32F429 discovery board introduction

The STM32F429 discovery board (STM32F429IGT6) also known as STM32F429 development board (STM32F429IGT6), is an integrated circuit board STM32F429 ic that uses the STM32F429IGT6 as the main control chip. It is a learning tool mainly used to develop the software and hardware of the STM32F429 sdio.

STM32F429IGT6 development board uses a 32-bit high-performance STM32F429 quad spi (Arm®Cortex®-M4) processor, which has improved performance and computing power, and increased application security.

This STM32F429 discovery board adopts a new baseboard + core board design, which not only has the functions of the smallest system, but also the core board can be used separately from the baseboard, which is small and flexible. Its core board integrates onboard resources such as CPU, STM32F429 flash, STM32F429 discovery SDRAM, and interfaces. Its bottom plate integrates STM32F429 WIFI, STM32F429 discovery ethernet, MP3, recording, 232 standard communication interface, 485 communication interface, buzzer, STM32F429 USB and STM32F429 USB HOST (can connect peripheral devices, such as connecting U disk, keyboard, mouse, etc.), serial port, 6-axis STM32F429 discovery gyroscope, photosensitive sensor and many other modules, which is very suitable for small and medium-sized project development.

The STM32F429 discovery board has high CPU frequency, high module integration, and high cost performance. It is very suitable for STM32F429 discovery getting started, and fit for electronic enthusiasts, educators, and technicians to study and develop.

STM32F429 discovery board

Features

  • 1. The STM32F429 discovery board has a flexible design

This STM32F429IGT6 development board adopts a new design of baseboard+ core board, and one board is multi-purpose. The baseboard is compatible with F429, F767, H743 core boards, with high performance ratio, and 3 core boards can be switched for use. The core board can also be used alone. The development board is equipped with RGB screen interface, STM32F429 USB power supply port, STM32F429 discovery LCD, buttons, STM32F429 discovery SDRAM, NAND (only in V2 version) and other resources onboard.

  • 2. Powerful performance

The STM32F429 discovery board uses the STM32F429IGT6 as the main control chip, which provides 32-bit high performance with a STM32F429 quad spi (Cortex™-M4) core (with floating-point unit) operating at 168 MHZ. When executed from STM32F429 flash, the STM32F429IGT6 chip can provide 210 DMIPS/566 CoreMark performance, and uses STMicroelectronics’ ART accelerator to achieve FLASH zero wait state. DSP instructions and floating-point units expand the product’s application range. The more powerful the chip, the more powerful the STM32F429 discovery board function will be.

  • 3. The STM32F429 discovery board has rich onboard resources, many interfaces and powerful functions

The onboard chip STM32F429IGT6 has rich embedded resources (8 serial ports, 16 STM32F429 timer pwm, 3 STM32F429 discovery ADC with a total of 24 channels, 2 DACs, 2 STM32F429 CAN, SDIO, FSMC, STM32F429 I2C, STM32F429 I2S, STM32F429 discovery SPI, network). Onboard DCMI camera interface, 100M Ethernet, six-axis STM32F429 discovery gyroscope, light sensor and other resources, full-speed USB OTG/high-speed USB OTG, everything is available.

  • 4. Abundant peripheral resources

The STM32F429 discovery board has many peripheral interfaces, which can be connected to modules such as Bluetooth module, infrared, temperature and humidity. The STM32F429 discovery board can be freely matched with peripheral modules to achieve more specific functions.

STM32F429 development board version

There are two versions of the STM32F429 development board (STM32F429IGT6), V1 and V2 respectively. Both versions are used together with the baseboard + core board.

The two versions are equipped with different baseboards and core boards. The specific differences are:

STM32F429 development board
STM32F429IGT6 development board – V1
STM32F429 discovery kit
STM32F429IGT6 development board – V2

comparison of STM32F429 discovery board baseboard hardware resource

comparison of STM32F429 discovery board core board hardware resources

  • STM32F429 discovery board datasheet (STM32F429IGT6) – V1 Core board + baseboard Package list
stm32f429 discovery price
  • STM32F429 discovery board datasheet (STM32F429IGT6) – V1 baseboard package list
stm32f429 discovery
  • STM32F429 discovery board datasheet (STM32F429IGT6) – V2 Core board + baseboard Package list
stm32f429 discovery kit
  • STM32F429 discovery datasheet (STM32F429IGT6) – V2 baseboard package list
stm32f429 discovery buy
  • STM32F429 discovery board schematic of STM32F429IGT6 -V1 version core board
stm32f429 discovery board schematic
STM32F429 discovery board schematic
STM32F429 schematic
  • STM32F429 discovery board schematic of STM32F429IGT6-V1 version baseboard
stm32f429 discovery schematic
STM32F429 discovery schematic pdf
stm32f429 discovery schematic pdf
stm32f4 discovery expansion board schematic
stm32f4 discovery board schematic pdf
stm32f4 development board schematic
stm32f429i-disc1 schematic pdf
stm32f4 discovery board schematic pdf of LCD
  • STM32F4 discovery board schematic of STM32F429IGT6-V2 version core board
stm32f4 discovery board schematic pdf
stm32f4 discovery board schematic pdf of MCU

if you need more information, you can click here to dowm load stm32f429 discovery schematic pdf

  • STM32F4 discovery board schematic of STM32F429IGT6-V2 version baseboard
stm32f4 discovery board schematic of baseboard
stm32f4 discovery board schematic of baseboard connector
stm32f4 discovery board schematic of stm32f4 discovery board pinout
stm32f4 discovery board schematic of LCD interface
stm32f4 discovery board schematic of USB
stm32f4 discovery board schematic of camera interface
stm32f4 discovery board schematic of ethernet interface
stm32f4 discovery board schematic
stm32f4 discovery board schematic of MIC
stm32f4 discovery board schematic of LCD backlight

stm32f429 discovery pinout

stm32f429 discovery pinout
stm32f429 discovery pinout
stm32f429 pinout

STM32F429 discovery example projects – STM32F429 discovery board examples

Experiment 1, STM32F429 discovery LED blink Application and Clock Display

① Operate the LED1, LED2, Start keys to control the LED status on the STM32F429 discovery kit;

②The clock has both pointer and digital display, as well as year, month, day and temperature display

Please contact us for STM32F429 discovery reference manual, STM32F429 discovery firmware package, STM32F429 discovery tutorial etc.

STM32F429 discovery board examples

Experiment 2, Simple Calculator and 3D Applications

① Calculate some common calculator functions such as addition, subtraction, multiplication and division, square root, square, M^N power, sine, cosine, tangent, logarithm, reciprocal, format conversion;

② Requires an external PZ-MPU6050 acceleration gyroscope module, 3 dials to display the pitch angle, roll angle and heading angle detected by MPU6050

Please contact us for STM32F429 discovery manual, STM32F429 discovery firmware package, STM32F429 discovery tutorial.

STM32F429 discovery projects

Experiment 3, STM32F429 discovery USB example – Music Player

STM32F429 discovery USB example  needs an external PZ-WM8978 MP3 module to achieve this STM32F429 discovery demo source code. The supported audio formats include: MP3, WMA, OGG, WAV, FLAC, M4A, AAC, etc., display the name of the currently playing song, playback progress, playback duration, total duration, sample rate , bits, bit rate, volume, current file number, total number of files and other information.

Please contact us for STM32F429 discovery demo code, STM32F429 discovery sample code, STM32F429 discovery display example, STM32F429 discovery user manual, STM32F429 discovery firmware, STM32F429 discovery tutorial etc.

STM32F429 discovery example for MP3

Experiment 4, STM32F429 can example – Communication Function

Support CAN, RS232, RS485 function test, you can click any function test on the screen

Please contact us for STM32F429 discovery board user manual, STM32F429 discovery firmware, STM32F429 discovery tutorial etc.

STM32F429 discovery examples

Experiment 5, STM32F429 discovery LCD example 

When the STM32F429 discovery board is connected to a 7-inch STM32F429 discovery LCD (4.3-inch or 5-inch STM32F429 discovery LCD also ok), the STM32F429 discovery lcd display interface is shown in the figure, and there are various small icons on the interface, can realize various functions on the development board, such as testing voltage (twist the white knob rheostat on the upper right of the STM32F429 discovery board, and the voltage sampled by the STM32F429 discovery ADC pin of the chip is displayed on the STM32F429 discovery touch screen), measuring temperature (insert the DHT11 module into the right side of the STM32F429 discovery kit, and the obtained temperature and humidity values ​​will be displayed on the screen), view pictures (put jpg, png, bmp, gif files that do not exceed the screen resolution size into the TF card and insert them into the development board, you can scan the above files and click the arrow to switch to browse), recording ( The TF card needs to be inserted into STM32F429 discovery board, click on the left side to start recording, record from the microphone in the upper right corner of the baseboard, click to stop recording, and the audio generated in the TF card can be played on the right side, and the earphone can be plugged into the green interface to listen), play MP3, play Video, text messages and phone calls (this experiment needs to be used with the GSM800A module).

For the connection between the STM32F429 discovery board and the module, please download the development board information (or contact us). Correctly connect the wires and the module, insert the mobile card, according to the icon and button prompts, you can make a call (use the earphone to plug into the module) and send a text message, etc. With the improvement of control technology in industry, microcontroller technology is more and more widely used in the packing machine industry, pipe bending machine industry, etc. At present, the microcontroller technology developed by 8051 development board is mostly used to control the packaging system.

Click on each small icon to display various functions.

STM32F429 discovery lcd display

Figure 1 shows the pattern Demo, which can display text, pattern, rectangle, and DMA2D acceleration effect

STM32F429 discovery display

Figure 2 shows Demo waveforms, which can be used to display sine waves, triangle waves, square waves, and clutter

STM32F429 discovery lcd

Figure 3 shows music playback Demo, the background can be changed, supports WAV and MP3 formats, supports fast forward, rewind, pause, play, lyrics display, song selection, volume adjustment. Put the .wav or .mp3 file into the TF card and insert it into the STM32F429 discovery kit. The music player can list the scanned music files and play them. Plug the earphone into the green interface of the development board to listen.

STM32F429 discovery lcd

Figure 4 is a video playback demo that only supports AVI format with a resolution of 480×272 and a frame rate of about 10 frames. Put the .avi file that does not exceed the screen and the smallest possible resolution into the TF card and insert it into STM32F429 discovery kit. The video player can list the scanned video files and play them.

The above is only part information of the STM32F429 discovery LCD example, if you want to get more resources (such as STM32F429 discovery demo source code, STM32F429 discovery lcd tutorial), welcome to contact us.

STM32F429 discovery example code

  • Description

1. Basic timers are almost always used in DAC conversion. Use the basic timers to trigger DAC conversion content to achieve simple timing functions.

2. We use the basic timer to cycle for 0.5s and enable the timer interrupt. Every 0.5s, the RGB lights are flipped in the timer interrupt service function, so that the final effect of the RGB lights is dark for 0.5s and bright for 0.5s. And cycle.

  • Software analysis

(1) Macro definition

     Using macro definitions is very convenient for program upgrade and migration

STM32F429 discovery sample code

(2) NCIV configuration

     The timer update interrupt is used in the experiment, and the NVIC needs to be configured. There is only one interrupt in the experiment, and there are no specific requirements for the NVIC configuration.

STM32F429 discovery sample code

(3) STM32F429 timer pwm mode configuration

     The timer clock must be turned on before using the timer. The basic timer belongs to the APB1 bus peripheral.

     Next, set the timer period to 4999, that is, count 5000 generated events. Set the timer prescaler to (8400-1), the basic timer enables the internal clock, the frequency is 84MHz, and the frequency of 10KHz is obtained after the prescaler. Then call the TIM_HAL_TIM_Base_Init function to complete the timer configuration.

Finally, use the HAL_TIM_Base_Start_IT function to start the timer and update the interrupt.

STM32F429 discovery sample code

(4) STM32F429 timer interrupt

     We start the timer update interrupt in the TIM_Mode_Config function, and when the interrupt occurs, the interrupt service function is run. Directly call the library function HAL_TIM_IRQHandler function in the service function, it will generate an interrupt callback function HAL_TIM_PeriodElapsedCallback, which is used to add user code, and make sure that the TIM6 generates an interrupt before running the RGB color light flipping action.

STM32F429 discovery demo source code

(5) Main function

     In the experiment, the system clock is initialized first, and the RGB lights are used, which needs to be initialized and configured. The LED_GPIO_Config function is a program defined in the bsp_led.c file to complete the GPIO initialization configuration of the RGB lights.

The TIMx_Configuration function is a function defined in the bsp_basic_tim.c file. It simply calls the two functions TIMx_NVIC_Configuration and TIM_Mode_Config to complete the NVIC configuration and the basic timer mode configuration.

STM32F429 discovery demo source code

(6) Download verification

 Make sure that the relevant hardware of the STM32F429IGT6 development board is connected correctly, and download the compiled program to the STM32F429IGT6 development board. At first, the RGB lights are dark, and after a while, the RGB lights turn red, and after a while, they are dark again, and the cycle repeats. If we compare the flickering of the clock with the RGB lights, we can find that it changes the state of the RGB lights every 0.5s.

On the basis of the calendar experiment, use the alarm clock function of RTC to make an alarm clock, generate an alarm clock every day [XX hours-XX minutes-XX seconds], and then the buzzer will sound.

  • Hardware design

The STM32F429  rtc example uses an on-chip RTC. In order to ensure that the time can be saved and continue to run when VDD is powered off, a CR1220 battery holder is connected to the VBAT pin to put the CR1220 battery to power the RTC. RTC external CR1220 battery holder.

The STM32F429 discovery circuit diagram is shown in the figure.

  • Software design

The alarm clock experiment is added on the basis of the calendar experiment. The same part of the code will not be explained. Only the alarm clock related code will be explained here. For more specific information, please refer to the project source code of the alarm clock experiment. ;

1.  Alarm clock related macro definition

     In order to facilitate program porting, we encapsulate the code that needs to be modified frequently with macros. If you need to set the alarm time and the mask field of the alarm, just modify these macros. These macros correspond to the members of the RTC alarm clock structure. If you want to know the specific meaning of each macro, please refer to the “RTC Alarm Clock Structure Explanation” section.

For the mask of the alarm clock time field, ALARM_MASK, we configure the mask to drop the date/week, that is, ignore the date/week, then the alarm time is only valid for hours/minutes/seconds, that is, the alarm will ring every day at this time. The mask has other values, and the user can modify it for experimentation.

STM32F429 discovery sample code

2.  Programming Essentials

     (1) Initialize RTC, set the initial time of RTC;

     (2) Program the alarm clock and set the alarm time;

     (3) Write the alarm interrupt service function;

3.  Code analysis

 (1) Alarm setting function

From the reference manual, to make the RTC alarm clock interrupt, three steps must be followed. The RTC_AlarmSet() function can be read according to these three steps and the comments in the code.

STM32F429 discovery sample code

(2) RTC interrupt

All RTC interrupts are connected to the EXTI controller. To interrupt the RTC alarm, follow the sequence below;

     Step 1. Configure EXTI line 17 as interrupt mode and enable it, then select rising edge valid.

     Step 2. Configure and enable the RTC_Alarm lRQ channel in the NVIC.

     Step 3. Configure the RTC to generate an RTC alarm (alarm A or alarm B).

RTC alarm interrupt programming steps (taken from the RTC chapter of the STM32F4xx reference manual)

In step 3, configure the RTC to generate an RTC alarm, there are also detailed step-by-step instructions in the manual.

(3) Program the alarm clock

To program or update a programmable alarm (alarm A or alarm B), similar steps must be performed:

1. Clear the ALRAE or ALRBE bit in the RTC_CR register to disable Alarm A or Alarm B.

2. Poll the ALRAWF or ALRBWF bits in the RTC_ISR register until either is set to ensure the alarm

registers can be accessed. It takes about 2 RTCCLK clock cycles (due to clock synchronization).

3. Program the Alarm A or Alarm B register (RTC_ALRMASSR/RTC_ALRMAR or RTC_ALRMBSSR/RTC_ALRMBR).

4. Set the ALRAE or ALRBE bit in the RTC_CR register to enable Alarm A or Alarm B again.

RTC alarm clock programming steps (taken from the RTC chapter of the STM32F4xx reference manual)

The steps 1 and 2 of programming the alarm clock are implemented by the firmware library function RTC_AlarmCmd(RTC_Alarm_X, DISABLE); that is, the alarm clock must be disabled first when programming the alarm clock register to set the alarm time. You can read the comments of the supporting code for the remaining two steps.

4.  Alarm interrupt service function

     If the calendar time reaches the time set by the alarm clock, an alarm clock interrupt is generated, and the corresponding flag bit is cleared to 0 in the interrupt function. Then the interrupt service function will call the alarm callback function. In order to indicate that the alarm time is up, we make the buzzer sound.

STM32F429 discovery sample code

5.  Main function

     In the main function, we judge whether the RTC has been initialized by reading the value of the backup register. If not, we will first know the RTC and set the alarm time. If it has been initialized, we will judge whether it is a power supply or an external pin reset and clear the alarm. the associated interrupt flag bit.

STM32F429 discovery sample code
STM32F429 discovery sample code

6.  Download verification   

     Download the compiled program to the development board. When the calendar time reaches the alarm time, the buzzer keeps ringing, but the calendar will continue to run.

  • STM32F429 discovery USART example  Description

In order for the STM32F429 discovery board to also support functions such as STM32F429 discovery printf, scanf, getchar, etc., it is necessary to add the STM32F429 discovery UART send and receive functions to the internal functions of these functions.

Since we can input instructions in the serial port debugging assistant to let the STM32F429 discovery kit perform some tasks according to these instructions, now we write a program to let the STM32F429 discovery kit receive STM32F429 discovery UART data, and then control the color of the RGB lights according to the data content.

  • STM32F429 discovery USART example  Programming points

•Initialize and configure the GPIO of the RGB color light;

•Enable RX and TX pin GPIO clock and USART clock;

•Initialize STM32F429 discovery GPIO and multiplex GPIO to USART;

•Configure STM32F429 USART parameters;

•Enable STM32F429 USART;

•Obtain instruction input and control RGB colored lights according to the instruction.

  • STM32F429 discovery USART example code analysis

1.STM32F429 discovery GPIO and  STM32F429  USART macro definition

       Using macro definitions is convenient for program porting and upgrading. Here we can set the baud rate of USART1 to 115200.

STM32F429 discovery example code

2. USART initialization configuration

STM32F429 discovery example code
STM32F429 discovery example code

In this function, we did not use the HAL_UART_MspInit function. For the sake of intuition and simplicity, we directly configure the pins and clocks in the UARTx_Config function. We will also use this method extensively in some routines in the future.

Use the GPIO_InitTypeDef and USART_InitTypeDef structures to define a GPIO initialization variable and a USART initialization variable. The contents of these two structures have been explained in detail before.

Call the UARTx_RX_GPIO_CLK_ENABLE and UARTx_TX_GPIO_CLK_ENABLE functions to enable the GPIO port clock, and the corresponding port clock must be enabled before using the GPIO.

Initially configure the RX line and TX line pins as multiplex functions, and connect the specified STM32F429 discovery GPIO to USART1, and then configure the working parameters of the serial port as 115200-8-N-1. Finally, call the HAL_UART_Init function to initialize the STM32F429 USART.

3. Redirect the STM32F429 discovery printf and scanf functions    

STM32F429 discovery example code

The fputc function is a function inside the STM32F429 discovery printf function. Its function is to write the character ch to the current write pointer position of the file pointed to by the file pointer f. The simple understanding is to write the character into a specific file. We use the STM32F429 USART function to re-modify the content of the fputc function to achieve a function similar to “write”. The fgetc function is very similar to the fputc function, which implements the character reading function. When using the scanf function, you need to pay attention to the character input format.

In order to use the STM32F429 discovery printf  and scanf functions, the stdio.h header file needs to be included in the file.

4. Output prompt information

     The Show_Message function all calls the STM32F429 discovery printf function to “print” the experimental operation information to the serial port debugging assistant.

STM32F429 discovery example code

5. Main function

STM32F429 sample code
STM32F429 sample code

First, we define a character variable to store the received characters.

Next, call the SystemClock_Config function to initialize the system clock, and call the LED_GPIO_Config function to complete the RGB color GPIO initialization configuration. This function is defined in the bsp_led.c file.

Call the USARTx_Config function to complete the USART initialization configuration.

The Show_Message function uses the STM32F429 discovery printf function to print the experimental instruction description information.

The getchar function is used to wait for a character and return the character. We use the ch variable to keep the returned character, and then judge the content of ch to execute the corresponding program.

We use the switch statement to determine the content of the ch variable and execute the corresponding function program.

 6. Download verification

      Ensure that the related hardware of the STM32F429 discovery board is connected correctly, connect the “USB to serial port” interface of the STM32F429 discovery board and the computer with a USB cable, open the serial port debugging assistant on the computer side, download the compiled program to the STM32F429 discovery kit, and the serial debugging assistant can receive the data sent by STM32F429 discovery kit. We enter a specific character in the send area of ​​the serial port debugging assistant, click the send button, and the state of the RGB color light changes accordingly.

1. STM32F429 discovery can bus example  introduction

The STM32F429 discovery can bus example demonstrates how to use the STM32F429 CAN peripheral to realize the communication between two devices. Two experimental boards are used in this STM32F429 discovery can bus example. If you only have one experimental board, you can also use the loopback mode of STM32F429 CAN for testing. To this end, we provide two STM32F429 discovery example projects, “CAN-dual machine communication” and “CAN-loopback test”, you can choose the corresponding project to learn according to your own experimental environment. The main bodies of these two STM32F429 discovery projects are the same. This STM32F429 discovery tutorial mainly uses the “CAN-dual machine communication” project to explain.

2. STM32F429 discovery can bus example Hardware design

STM32F429 discovery can bus example
Dual CAN communication experiment hardware connection diagram

The picture shows the hardware connections of the two experimental boards. In a single experiment board, STM32 as a CAN controller leads two STM32F429 discovery pinout of CAN_Tx and CAN_Rx to connect with the CAN transceiver TJA1050, and the transceiver uses CANH and CANL STM32F429 pins to connect to the STM32F429 CAN bus network. For the convenience of use, each of the CANH and CANL of our experiment board is connected with a 120-ohm resistor as the terminal resistance of the STM32F429 CAN bus, so pay attention if you want to connect the experiment board to the existing STM32F429 CAN bus as a common node , the resistor should not be added!

To achieve communication, we need to use wires to connect the CANH and CANL buses from the experiment board to form a complete network. CANH1 and CANH2 are connected between experiment boards, and CANL1 and CANL2 are connected.

It should be noted that since the signal line used by our experiment board STM32F429 CAN is shared with the camera, in order to prevent interference, we usually do not supply power to the STM32F429 CAN transceiver by default. /4-5V” pin is connected to the “5V” pin with a jumper cap for power supply, and the camera is unplugged from the board.

If you are using a stand-alone loopback test engineering experiment, there is no need to use wires to connect the board, and there is no need to supply power to the transceiver, because the signal in the loopback mode does not pass through the transceiver.

3STM32F429 discovery can bus example Software design

In order to make the STM32F429 example project more organized, we store the codes related to the CAN controller independently for future porting. Create new “bsp_can.c” and “bsp_can.h” files on top of “Serial Port Experiment”. These files can also be named according to your preferences. They are not part of the contents of the STM32HAL library and are written by ourselves according to application needs.

(1)  Programming points

•Initialize the target pin and port clock used by STM32F429 CAN communication;

•Enable the clock of the STM32F429 CAN peripheral;

•Configure the working mode, bit timing and baud rate of the STM32F429 CAN peripheral;

•Configure how the filter works;

•Write test programs, send and receive messages and verify them.

(2) Code Analysis

CAN hardware related macro definition

We define STM32F429 CAN hardware-related configurations in the form of macros in the “bsp_can.h” file.

STM32F429 sample code

According to the hardware connection, the above code encapsulates the STM32F429 CAN number, pin number and clock used for STM32F429 CAN bus communication with macros, and defines the interrupt vector and interrupt service function of the receiving interrupt. We get the information of the receiving FIFO through the interrupt. Note that in the STM32F429 discovery GPIO clock part, we also added the AFIO clock, which is set for the STM32F429 CAN bus multiplexing function remapping below. When using the multiplexing function remapping, the AFIO clock must be turned on.

Initialize the STM32F429 discovery GPIO  of STM32F429 CAN

      Use the above macro to write the initialization function of STM32F429 CAN.

stm32f429 discovery example code

Like all peripherals that use STM32F429 discovery GPIO, you must first initialize the STM32F429 discovery GPIO pin mode used, configure the multiplexing function, and configure the two pins of CAN as a general-purpose push-pull output mode.

Configure the working mode of STM32F429 CAN      

      Since we are communicating between the two boards we use, the baud rate and other configurations only need to be consistent between the two boards. If you want the experiment board to communicate with a STM32F429 CAN bus network communication node, then the STM32F429 CAN configuration of the experiment board must be consistent with the STM32F429 CAN bus.

STM32F429 discovery demo source code
STM32F429 sample code

This code is mainly to set the STM32F429 CAN mode to the normal working mode. If you are reading the “CAN-Loopback Test” project, it is configured as the loopback mode here. Besides, the two STM32F429 discovery projects have no other difference.

In the code, the BS1 and BS2 sections in the bit timing are also set to 4Tq and 2Tq respectively, plus the SYNC_SEG section, a CAN data bit is 9Tq, and the frequency division of the STM32F429 CAN peripheral is configured as a 6 frequency division. The used bus clock fAPB1 = 42MHz, so we can calculate its baud rate:

1Tq = 1/(42M/6)=1/7us

T1bit=(4+2+1) x Tq =1us

Baud rate=1/T1bit=1Mbps

Configure filter

STM32F429 discovery demo source code

This code configures filter group 0 as a 32-bit mask pattern, and connects its output to receive FIFO0. If it passes the filter match, the message will be stored in receive FIFO0.

The focus of the filter configuration is to configure the ID and mask, according to our configuration, this filter works in the pattern in the figure.

A 32-bit mask pattern filter
A 32-bit mask pattern filter

Configure Receive Interrupt

When FIFO0 receives data, it will cause an interrupt. The priority configuration of the receiving interrupt is as follows:

STM32F429 discovery demo source code

This part is the same as we configure the priority of other interrupts. They are all configured with the NVIC structure. The priority can be configured according to your own needs. The most important thing is the interrupt vector. In the above code, the interrupt vector is configured as the receive interrupt of STM32F429 CAN.

Set send message

To use STM32F429 CAN to send a message, we need to define a send message structure and assign it a value,

STM32F429 discovery demo source code

This code is a function that we define to set the content of the message for the convenience of demonstration. It sets the message as a data frame in the extended mode, the extended ID is 0x1314, the length of the data segment is 8, and the data content is 0 -7. In actual application, you can send and set the content of the message according to your own needs. After we set the content of the message, call the library function HAL_CAN_Transmit_IT to store the message in the sending mailbox, and then the STM32F429 CAN peripheral will send it out.

Receive message

Since we have set the receiving interrupt, the operation of receiving the message is completed in the interrupt service function,

It should be noted that if the receiving message interrupt is set, the HAL_CAN_Receive_IT function must be called in the interrupt to read the content of the receiving FIFO, because only in this way can the receiving interrupt flag of the FIFO be cleared. If it is not called in the interrupt to clear the flag, once received message, STM32 will continue to enter the interrupt service function, causing the program to freeze.

(3)  Main function

STM32F429 discovery demo source code
STM32F429 discovery demo source code

3. Download verification

When downloading and verifying this STM32F429 discovery CAN bus example experiment, we recommend that you first use the “CAN-loopback test” project for testing. Its environment configuration is relatively simple, and only one experiment board is needed. Use a STM32F429 discovery USB cable to connect the “USB TO UART” interface of the experiment board to the computer. Connect it, open the serial port debugging assistant on the computer side, and download the compiled STM32F429 discovery demo project to the experiment board, and then reset. At this time, you can see the debugging information of the STM32F429 CAN test in the serial port debugging assistant, press the KEY1 button on the experiment board, and the experiment board will use the loopback mode to send messages to itself, and you can see the corresponding sending and receiving information in the serial port debugging assistant .

After using the loopback test successfully, if you have two experimental boards, you need to connect the STM32F429 CAN bus of the two boards according to the illustration in the “Hardware Design” section, and be sure to connect the jumper cap to power the STM32F429 CAN transceiver and unplug the camera Prevent distractions. Use the STM32F429 discovery USB cable to connect the “USB TO UART” interface of the experimental board to the computer, open the serial port debugging assistant on the computer, then use the “CAN-dual machine communication” STM32F429 discovery demo  project to compile, and download the program to both boards, and then reset. At this time, you can see the debugging information of the CAN test in the serial debugging assistant, press the KEY1 button on one of the experimental boards, and the other experimental board will receive the message, and you can see the corresponding sending and receiving information in the serial debugging assistant .

Contact us

You can contact us for more STM32F429 discovery example and STM32F429 discovery example projects. For example: STM32F429 discovery sdram example; Use STM32F429 disco to receive data through STM32F429 discovery freertos; with STM32F429i-disc1 and STM32F429 discovery touchgfx to do STM32F429 discovery touchgfx example;  STM32F429i discovery board to do STM32F429 discovery ltdc example etc., and you can also contact us about STM32F429 discovery tutorial such as STM32F429 discovery display tutorial, STM32F429 discovery lcd tutorial, and other points such as STM32F429-discovery firmware download, STM32F429 discovery datasheet pdf, STM32F429 discovery buy, STM32F429 discovery price and other more details.

Also we have other more STM32 development boards, ESP32 development board, can meet different requirements of users. Welcome to click WHATSAPP to consult us.

STM32F429 discovery board user manual—-STM32F429IGT6 Development Board FAQ (Frequently Asked Questions)

1: Can’t find the STM32F429 discovery USB to serial port?

There may be several reasons for this problem:

1) The STM32F429 discovery board is not powered. In this case, please check whether the blue power light in the lower right corner of the STM32F429 discovery kit is on. If it is not on, press the power switch. The power indicator must be on for the computer to find the STM32F429 discovery USB to serial port. In addition, this STM32F429 discovery board (STM32F429IGT6) does not support JLINK power supply, and it is not recommended that you use ST LINK to be the STM32F429 discovery power supply.

2) The wrong STM32F429 discovery USB port is inserted. To use the STM32F429 discovery USB to serial port, the STM32F429 discovery USB cable must be plugged into the USB_232 interface in the lower left corner of the STM32F429 discovery kit as the picture shows:

STM32F429 discovery USB to serial port

3) The STM32F429 discovery USB driver is not installed.

Please install the CH340G driver. The CH340 driver is located in the CD-ROM: 6, software data\software\CH340 driver (STM32F429 discovery USB serial port driver)_XP_WIN7 shared folder.

2. After flymcu downloads the code, it does not run.

This problem may have the following two situations:

1) flymcu is not checked: “execute after programming”. In this case, check this option and download it again, or press the reset button of the STM32F4 discovery board (STM32F429IGT6) .

2) The BO and B1 of the STM32F4 discovery board (STM32F429IGT6) are not connected to GND. Please check whether the BO and B1 of the discovery board are connected to GND, and they must be connected to GND.

3. CAN experiment, normal mode cannot send data.

The CAN experiment requires 2 or more nodes to communicate normally.

CAN is not like serial port and 485, even a single node can send (regardless of whether the other party receives it or not), CAN must have 2 or more nodes, and the program is correct, can send successfully.

 STM32F4 discovery kit Shipping Standard Package List

STM32F4 discovery board (STM32F429IGT6) Shipping Standard Package List

 STM32F429 discovery Kit External expansion module

STM32F429 discovery kit External expansion module

Contact us for more 

If you want to do STM32F429 discovery buy, know STM32F429 discovery price, STM32F429 discovery user manual pdf, STM32F429 discovery board schematic and more information, welcome to contact us.

You can also click STM32 Development Board to see other development boards in our STM32 series, and we also have other types of development boards to choose from, such as ESP32 Development Board, Raspberry pi development board, 8051 development board, etc.