Skip to content

STM32F7DISCOVERY

lbuild config: modm:disco-f746ng

Discovery kit for STM32F746

External Memory

The SDRAM on the FMC is configured before main() and added to the heap. Only 16 of its 32 data bits are connected, so 8MB of its 16MB are accessible. You can allocate from it with new (modm::MemoryExternal) T or place objects into it with the .data_sdram, .bss_sdram or .noinit_sdram sections.

The Cortex-M7 treats 0xC0000000 as device memory, which does not allow unaligned accesses, so the MPU maps the SDRAM as normal memory. It is not cacheable, so that the CPU and DMAs always see the same data.

TinyUSB

This board has two USB ports: one with Full Speed support and another with true High Speed support. By default, TinyUSB runs the device classes on the FS port, however, you can reassign it to HS via this option:

<options>
  <option name="modm:ext:tinyusb:config">device.cdc,device.msc</option>
  <option name="modm:ext:tinyusb:device:port">hs</option>
</options>

Note that can use TinyUSB with both the device and host classes at the same time if you assign them to different ports:

<options>
  <option name="modm:ext:tinyusb:config">device.cdc,device.msc</option>
  <option name="modm:ext:tinyusb:device:port">fs</option>
  <option name="modm:ext:tinyusb:host:port">hs</option>
</options>

Configuration

<library>
  <options>
    <option name="modm:target">stm32f746ngh6</option>
  </options>
  <modules>
    <module>modm:board:disco-f746ng</module>
  </modules>
</library>