UM1718Tutorial 1: From pinout to project C code generation using an MCU of the STM32F4 series

11.6.4Configuring the DMAs

This is not required for this example. It is recommended to use DMA transfers to offload the CPU. The DMA Configuration window provides a fast and easy way to configure the DMAs (see Figure 326):

1.add a new DMA request and select among a list of possible configurations.

2.select among the available streams.

3.select the Direction: Memory to Peripheral or Peripheral to Memory.

4.select a Priority.

5.enable the FIFO.

Note:

Configuring the DMA for a given peripheral and middleware can also be performed using

 

the Peripheral and Middleware configuration window.

 

Figure 326. DMA parameters configuration window

 

 

UM1718 Rev 41

301/453

Tutorial 1: From pinout to project C code generation using an MCU of the STM32F4 series

11.6.5Configuring the middleware

This is not required for the example taken for the tutorial.

If a peripheral is required for a middleware mode, the peripheral must be configured in the Pinout view for the middleware mode to become available. A tooltip can guide the user as shown below.

Figure 327. Middleware tooltip

1.Configure the USB peripheral from the Pinout view.

Figure 328. USB Host configuration

2.Select MSC_FS class from USB Host middleware.

3.Select the checkbox to enable FatFs USB mode in the tree panel.

302/453

UM1718 Rev 41

UM1718Tutorial 1: From pinout to project C code generation using an MCU of the STM32F4 series

Figure 329. FatFs over USB mode enabled

UM1718 Rev 41

303/453

Tutorial 1: From pinout to project C code generation using an MCU of the STM32F4 series

4.Select the Configuration view. FatFs and USB buttons are then displayed.

Figure 330. System view with FatFs and USB enabled

304/453

UM1718 Rev 41

UM1718Tutorial 1: From pinout to project C code generation using an MCU of the STM32F4 series

5.FatFs and USB using default settings are already marked as configured . Click FatFs and USB buttons to display default configuration settings. You can also change them by following the guidelines provided at the bottom of the window.

Figure 331. FatFs define statements

UM1718 Rev 41

305/453

Соседние файлы в папке STM