我有一个项目运行在和谐V1.09几个月,现在使用尽可能少的和谐,为USAT,SPI,I2C,定时器,和SQI。现在是打开USB端口的时候,我只需要读取和写入文件到USB闪存驱动器。因此,我确认我的USB时钟在48 MHz是正确的,打开USB堆栈,中断模式,USB主机,UBSyPythyIX高,1设备,1 TPL条目,主机最大接口每设备5,并使用MSD主机客户端D。河流(附图)。当从框架中保存更新的系统文件时,我会看到预期的新条目、新的SysSObjor项、用于USB /USB主机/MSD的配置数据、以及如预期的IO In()和“任务任务”调用。我没有增加使用USB端口的调用,所以只有初始化调用与主循环中的任务调用一起进行。现在,当我的项目运行时,我看到一些图形对象在屏幕上改变颜色,因为我翻过不同的窗口,特别是一个对象。我发现某个东西正在改变对象的调色板结构中的值,所以我进入调试模式,并在RAM中写入这些调色板对象的地址设置断点。一旦我通过了调色板数据初始化过程中发生的断点,很快就会捕获更多的断点,并看到我的结构中的数据被改变。好的,我可以看到它正在发生…在堆栈窗口中,MPLAB报告说地址中没有代码导致数据损坏,所以我打开链接器映射文件并使用PC地址,我看到它正在库函数“FPUT”中发生。提醒我不是打开,写作,关闭文件与USB!有人见过这样的东西吗?有没有人使用和谐软件在PIC32 MZ上运行USB?任何帮助将不胜感激!项目详情:PIC32 MZ2048 EFH144、和声V1.09、XC32 V1.42和MPLABX V3.51拉里
以上来自于百度翻译
以下为原文
I have a project running in H
ARMony V1.09 for several months now, uses as little of Harmony as possible for USART, SPI, I2C,
timer, and SQI. Now it's time to turn on the USB port with which I only need to read and write files to a USB flash drive.
So I confirm that my USB clock is proper at 48MHz, turn on USB Stack, Interrupt Mode, USB Host, USB_SPEED_HIGH, 1 Device, 1 TPL Entry, Host Max Interface per device 5, and Use MSD Host Client Driver (image attached). When saving the updated system files from the framework I see new entries as expected, new SYS_OBJECT items, configuration data for USB/USB Host/MSD, and _Init() and _Task function calls as expected. I have added no calls to use the USB port, so only the initialization calls are being made along with the task calls in the main loop.
Now when my project runs I see some of my graphic objects changing color on the screen as I flip through different windows, one object especially. I detect that something is changing the values in that object's color palette struct so I drop into debug mode and set a breakpoint on writing to those palette object's address in RAM. Once I step through the breakpoints happening during my initialization of the palette data I soon catch more breakpoints triggered and see the data in my structs being changed. Ok, I can see it happening ... In the Stack window MPLAB reports that there is no code at the address causing the data corruption, so I open the linker map file and using the PC address provided I see that it is happening in the library function 'fputs' ... Reminder that I am not opening, writing, of closing files with the USB!
Has anyone seen anything like this? Has anyone gotten the USB running on a PIC32MZ using Harmony? Any help would be greatly appreciated!
Project particulars: PIC32MZ2048EFH144, Harmony V1.09, XC32 V1.42, and MPLABX V3.51
Larry
Attached Image(s)
0