Hi,
I am working on MCF52259 microcontroller. The modules i am using are QSPI, USB and some pins. Basically, I am reading some stuff from QSPI and storing it and finally sending it out on USB Isochronous endpoint. The problem is that my memory gets overwritten by unknown reason.
I looked into the docs and found out about the dual ported SRAM. Is that causing the problem.
Thanks in advance.
Regards.
Hi,
I further debugged the program and it looks like there is memory overlapping.
Let me explain the whole scenario.
Total RAM is 64K. I am using 60K for storage of data from QSPI. I sent the data via USB on isochronous endpoint.
The problem I think is that whenever I pass the buffer pointers to buffer descriptor, the DMA copies the data to another memory location for transfer. I do not know if it is copying it in the same RAM which i am using.
My RAM address is 0x20000000 and my RAMBAR register value is pointing to 0x20000000
Any help will be highly appreciated.
Regards.
I further looked into the problem and found out that as soon as the usb is in configured state, it overwrites the memory. Can somebody put some light on it. I do not understand it what is causing this problem.
Regards.
Salman, is that working for you?
Please keep us posted, we'd like to know :smileywink:
Best regards,
Monica
"Overwrites the memory". I assume you're meaning the USB is overwriting the last 4k that you're using for something else.
Are you sure you're following the "The BDT resides on a 512 byte boundary in system memory" rules?
Try configuring a smaller USB buffer size.
Try configuring the USB from 4k to 64k and put your other memory at the BOTTOM. That may give a different error that lets you keep investigating.
You had an incorrectly set up PACR causing you trouble, so check the rest of them and also check the MPR register.
Tom