USB interaction with DTCM (S70)?

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've got an application that's working fine running out of flash and with normal RAM. I'm taking baby steps forward in trying to turn on hardware optimizations for it. Turning on the ICache was successful, but the DCache broke things, probably due to concurrency problems. My action item there is to dive down into the ASF4 USB code and find all of the USB starts stops and add flush and invalidation calls. Not really looking forward to that, but that's another conversation.

 

Meanwhile, I tried carefully turning on DTCM. I went into the linker file and redefined the "ram" section to be the DTCM range. When I did that, everything worked - again - except for USB.

 

If I turn off TCM and move back to the normal RAM range for this chip (S70N19), it works again. Now here's the kicker: If I don't do anything else but reduce the RAM range size to be the same as the size of DTCM, it fails in the same way.

 

The linker says my application is using less than 4K of RAM. And the application works, it just doesn't show up on USB.

 

So what is USB doing that it cares how much RAM there is... but not in the way that shows in the size of the data or BSS segments?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This appears like it may be explained by the first errata in 59.5 of the datasheeet - that DMA access to TCM only works with 32 bit word size. I've found success by moving a small number of items into DTCM where I know either the data is aligned or that it doesn't interact at all with DMA.