infineon4engi@twitter infineon@linkedin infineon4engineers infineon@youtube
twitter Facebook Linkedin Youtube

+ Reply to Thread
Results 1 to 4 of 4

Thread: XMC4500. Transmit Flash->DMA->USB - impossible?

  1. #1
    Beginner Beginner rst is on a distinguished road
    Join Date
    Nov 2016
    Location
    Latvia, Riga
    Posts
    15
    Points
    189.375

    XMC4500. Transmit Flash->DMA->USB - impossible?

    I am trying to transmit data from internal flash-memory (of XMC4500) to USB (device-mode). Data transmits to IN-endpoint. USB works in DMA mode.
    But this doesn't work: I immediately get an "AHB Error" interrupt on the first transmitted address.
    I tried to specify the address or in the cached range (0x08000000 ... 0x080FFFFF) or in the uncached range (0x0C000000 ... 0x0C0FFFFF) - the result is same.
    I also tried disabling MPU - this does not help me either.
    The source data (in Flash) is 4-bytes aligned.

    Do I understand correctly that USB DMA can only read from RAM and cannot read from FLASH?
    I looked through the entire reference manual in search of a description of the possible causes of issue, but did not find anything. Maybe I missed something?
    Last edited by rst; Feb 15th, 2020 at 03:30 AM.

  2. #2

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    692
    Hi,


    The USB bus master interface has only access to DSRAM1 or DSRAM2.
    Click image for larger version

Name:	bus_matrix_xmc4500.png
Views:	2
Size:	23.9 KB
ID:	4457


    Regards,
    Jesus
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  3. #3
    Beginner Beginner rst is on a distinguished road
    Join Date
    Nov 2016
    Location
    Latvia, Riga
    Posts
    15
    Points
    189.375
    Thanks for your reply! Now everything is clear to me.

  4. #4
    Beginner Beginner rst is on a distinguished road
    Join Date
    Nov 2016
    Location
    Latvia, Riga
    Posts
    15
    Points
    189.375
    When I studied the low-level driver (xmc_usbd.c) from "XMClib v2.1.6 - XMC Peripheral Driver Library", I found certain bug:
    The XMC_USBD_EP_t :: outInUse flag is reset (set to "0") in many places source, but it is not set to "1" anywhere. It is always == 0.

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.