cancel
Showing results for 
Search instead for 
Did you mean: 

Programming STM32F746 to use TCM interface?

kevin2399
Associate III
Posted on March 04, 2016 at 15:32

I built a test program using STM32CubeMX to test the STM32F746 in TCM flash interface mode (selected from the dialog box brought up by using the Cortex M7 button on the configuration tab).  I imported the project into Atollic TrueStudio and tried to run the debugger, and the code does not load properly. I then created a HEX file and tried to use ST-Link v2 (firmware version V2J25S0).  The device will not program - I get 'internal command error'.

The auto-generated linker script file declares the FLASH region to start at 0x00200000, which is correct for the TCM interface.  However, documentation I have read indicates that this region of flash is not writeable.  The .MAP file also shows all of my code starting at the 0x00200000 address range.

Q1) How do I program a device to use this interface?

Q2) I will eventually want to do OTA application firmware updates.  Must I operate using the AXI interface to be able to write my code to flash?

FYI, my 'evaluation board' is an STM32F429i-DISCO with most of the components removed and the F429 replaced by the F746.  I needed a PCB with a lot of available I/O, and none of the F7 disco or eval boards fit the bill.  I only mention this because I am using the onboard ST-Link V2, in case that is somehow a problem. 
1 REPLY 1
Posted on March 04, 2016 at 18:20

Load it into ST-LINK as a binary and specify the address of the actual array.

Rebase the .HEX, or work through the output basing via the linker script or scatter file.

The TCM presents as the ART Cache if I'm not mistaken, the memory array is still in its regular location. Pretty sure there is no desire to implement write-through/back into ART, or dump in a lot of circuitry to handle coherency.

Write your OTA code to write the flash memory directly, I'm pretty sure there isn't a Through-the-TCM method, nor does there need to be.

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