完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我有一个项目运行在和谐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 HARMony 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) |
|
相关推荐
3个回答
|
|
再读一遍你的帖子,看看是否清楚。那么你使用UART、SPI、SQI、定时器和图形的和声吗?您在主机模式和MSD驱动程序中使用USB。你有没有为这个配置正确的文件系统设置?和谐不是强健的。它并不总是检查底层服务是否存在。它并不总是捕获空指针。所以验证你需要的一切就在那里。将您的应用程序与其中一个示例进行比较。
以上来自于百度翻译 以下为原文 Read your post again and see if it is clear to you. So you are using Harmony for uart, spi,SQI, the timer(s) and the graphics? You are using USB in Host Mode and the MSD driver. Do you have the file system setup an configured properly for this? Harmony is not robust. It does not always check if underlying services exist. It does not alway trap null pointers. So verify everything you need is there. Compare your app to one of the samples. |
|
|
|
NKurzman……”和谐不是强健的。LoLee是在我的项目中使用的程度和谐:振荡器配置,也是对我的图形CHIPI2C和SPI MARMONY的RIFLK输出初始化端口,我的代码使用SFR之后,没有调用和谐或PLIPTIME -和谐用于创建1ms中断在Time1,我HookuDuad,CAN,SQI -没有和谐代码,SQI只设置端口引脚任意图形-不使用微芯片系统,FTDI FT810通过SPI端口与我发现的例子相比,我发现我的SysfSnMutTab[]在SypLy.COFIG.h中是空的。从SD卡到MSD的服务,并打开自动安装和表。重新构建我的程序,同样的问题…我会继续挖掘…谢谢…
以上来自于百度翻译 以下为原文 NKurzman ... "Harmony is not robust." ... lol Here is the extent Harmony is used in my project: Oscillator configuration, also a REFCLK output to my graphics chip I2C & SPI - Marmony initializes port only, my code using SFR's after that, no calls to Harmony or PLIB Timer - Harmony used to create 1mS interrupts on Timer1 which I hooked UART, CAN, SQI - No Harmony code, SQI only sets port pins anyway Graphics - Not using Microchip system at all, FTDI FT810 through the SPI port Comparing to the example I found, I found that my sysfsMountTable[] was empty in system_config.h. Found difference in Harmong config, changed File System in System Services to MSD from SD Card and turned on Auto Mount and table was filled in. Rebuilt my program, same problem ... I will keep digging ... Thanks ... |
|
|
|
好的,找到了。它不是实际的USB和MSD代码,而是把它带到系统中移动了我的一些数据阵列,并且一个缓冲器被覆盖了(我第一次这样做过!…LOL)刚刚插入一个USB闪存驱动器,系统安装了它,并卸载它时,我拔出它。谢谢帮助!
以上来自于百度翻译 以下为原文 Ok, found it. It was not the actual USB and MSD code, but bringing that into the system moved some of my data arrays around and one buffer was being overwritten (first time I've ever done that! ... lol) Just plugged a USB flash drive in and the system mounted it, and unmounted it when I unplugged it. Thanks for the help! |
|
|
|
只有小组成员才能发言,加入小组>>
5253 浏览 9 评论
2038 浏览 8 评论
1958 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3219 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2267 浏览 5 评论
792浏览 1评论
688浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
617浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
686浏览 0评论
586浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-30 11:31 , Processed in 1.233003 second(s), Total 50, Slave 44 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号