完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
参考“SDCARDATA FAtiON SUNLYLE磁盘”示例项目,它运行良好。SD卡将挂载。简单地进入MHC并添加FrRetos。卡将不再挂载。我们需要能够与FreeRTOS一起使用SD卡。对于计时器“驱动程序”TMRSIDID2(从FS更新,因为RTOS使用TMRAIDID1),我没有任何中断。示例项目与TMRAIDID2工作。在“SythyStultTysA”的文件中没有中断处理程序,用于“ththANDRDVSDHC”处理程序。至少添加了SDHC中断处理。我已经将“SysSLCKBuxBuffixNo.4”添加到“时钟”系统服务中。这必须是对要安装的示例项目的“检查”。我找不到这个项目中使用或引用的地方。顺便说一下,如果创建一个新项目并添加FS,则不会发生这种情况。
以上来自于百度翻译 以下为原文 Referencing the 'sdcard_fat_single_disk' sample project it works fine. The SD Card will mount. Simply go into the MHC and add the FreeRTOS. The card will no longer mount. We need to be able to use the SD card along with the FreeRTOS. I do not get any interrupts for the timer 'driver' TMR_ID_2 (updated from the FS, because RTOS uses TMR_ID_1). Sample project works with TMR_ID_2. There is no interrupt handler in the file 'system_interrupt_a.S' for the 'IntHandlerDrvSDHC' handler. Adding this at least gets the SDHC interrupts processed. I have added the "SYS_CLK_BUS_REFERENCE_4' to the "clock" system service. This must be 'check' for the sample project to mount. I cannot find where this is used or referenced in the project. BTW, this does not happen if you create a new project and add the FS. |
|
相关推荐
2个回答
|
|
下面是使它工作的步骤。SD卡项目与FreeRTOSInstructions有关如何创建一个由FrRetos、SD Cara、PIC32 MS(带有SD主机控制器芯片)和FAT32文件系统组成的项目。系统配置MPLAB X3.65和谐203B的目标是使SD卡安装(MU)。创建一个新的项目在Apple FooDebug目标设备PIC32 MZ2064 DAH169中,当系统服务中的配置器OpenSSADD文件系统在系统服务的“时钟”中启用“第四”RealthyCLKO在列表中(第二个从上一个参考时钟)中的时钟检查“参考时钟输出使OE”在“驱动程序”下检查“SD主机控制器”下的“定时器”(在驱动程序中)TMR驱动程序实例0’被检查改变计时器模块到“TMRA ID2”在第三部分下的BSP配置下选择“PIC32 MZ DA启动工具包W 内部DDR”。IES & GT;从下拉列表中选择Box选择“FrRetos”,将“RTOS配置”扩展到“总堆大小”下,将其更改为“4000保存”,并在“AppStimultCyFig Debug 框架”中添加Office打开的文件“StasyBaseTract.As”。文件/ *SDHC中断*//Extn,ththeLeRDRvSDHC.Cudio.VECRTHOR191,代码,KEPE.VECRTORIX CHY191,ItvECdRDVSDHCGLUX,OVEL,VECRTORY,DISCORCHY191集NoMICROROPS.SET NOREORAD.SET NOMIPS16.SET NOAT.EntEncDeVDRTVSDHCN VECRTORDVSDHC:PoSAVEEL CONTEXLA S6,IntHandlerDrvSDHCJALR S6NoWestRealEngult.EntEnvCutRDVSDHCIN“StaseOx任务”将下列“SysffsTasks-()”循环到“ySysStaskEffice”中的“SysTrtMyTasks任务(SysObj.SyrMR)”中,将“DyvsSDHCII任务(SysObj.DrvSDHC)”添加到“OySysS任务”中的循环中,将“DRVYSDSDHCI任务(SysObj.DrvSDHC)”添加到“在“SythyIn.c”中添加“SysSytInEnable()”的“ySysState任务”中的“VTaskDelphi”函数调用;在“App.c”中,函数的“SysSudialItate(空洞*数据)”的底部将下面的代码放在“AppJuthState OnIT”应用程序状态中。相同的代码来自App.AppApHythEngInIt的样本:如果(SysffsIn安装(“/DEV/MMCBLK1”,“/MNT/MyDube”,FAT,0,NULL)!= 0){/*无法安装磁盘。尝试再次安装直到成功。*/AppDATA状态= APPYSTATEJIN;} {{/*挂载是成功的。设置当前驱动器,使我们不必使用绝对路径。*/AppDATA状态= APPYSTATEXServices任务;
以上来自于百度翻译 以下为原文 Here are the steps required to make it work. SD Card project with FreeRTOS Instructions on how to create a project consisting of freeRTOS, SD Cara, PIC32MS (with a SD Host Controller Chip) and a fat32 files system. System configuration MPLAB X 3.65 Harmony 203b The Goal is to get the SD Card to mount (must have this prior to using it).
In “clock” of system services enable the fourth ‘REFERENCE_CLKO’ down in list (second from last reference clock) In that clock check the “ reference clock output enable OE’ Under ‘driver’
Under the “timer” (in drivers)
Change the Timer Module to “TMR_ID_2” Under Third Parties -> RTOS
Select “FreeRTOS” from drop down list Expand the “RTOS Configuration”
Open the file “system_interrupt_a.S” in the “appsystem_configdefaultframework”
/* SDHC Interrupt */ .extern IntHandlerDrvSDHC .section .vector_191,code, keep .equ __vector_dispatch_191, IntVectorDrvSDHC .global __vector_dispatch_191 .set nomicromips .set noreorder .set nomips16 .set noat .ent IntVectorDrvSDHC IntVectorDrvSDHC: portSAVE_CONTEXT la s6, IntHandlerDrvSDHC jalr s6 nop portRESTORE_CONTEXT .end IntVectorDrvSDHC In “system_tasks” do the following things
Move “SYS_TMR_Tasks(sysObj.sysTmr)” into loop in “_SYS_Tasks” Add “DRV_SDHC_Tasks(sysObj.drvSDHC)” into loop in “_SYS_Tasks” This function is not called anywhere else. Remove the “vTaskDelay” function call in “_SYS_Tasks” In “app.c” put the following code in the “APP_STATE_INIT” app state. Same code from the sample app. case APP_STATE_INIT: if(SYS_FS_Mount("/dev/mmcblka1", "/mnt/myDrive", FAT, 0, NULL) != 0) { /* The disk could not be mounted. Try * mounting again untill success. */ appData.state = APP_STATE_INIT; } else { /* Mount was successful. Set current drive so that we do not have to use absolute path. */ appData.state = APP_STATE_SERVICE_TASKS; } Break; |
|
|
|
嘿!只是想说声谢谢,因为找到你的帖子是一个很好的节省时间的方法。似乎缺少的是程序集文件中的中断向量处理程序。我在没有RTOS的情况下工作,只是复制了你在“StasyBufftT.T.S”文件中张贴的处理程序功能。论坛中有一些帖子似乎缺少相同的内容,所以我将把它们重定向到这里。谢谢你,伙计!-马尔科
以上来自于百度翻译 以下为原文 Hey! Just wanted to say thank you, because finding your post has been a great time saver. Seems that the thing missing was the interrupt vector handler in the assembly file. I got it working without the RTOS, just by copying the handler function you posted in the "system_interrupt_a.s" file. There are some posts in the forum that seem to be missing the same, so I am going to redirect them here. Thank you, pal! -Marko |
|
|
|
只有小组成员才能发言,加入小组>>
5171 浏览 9 评论
2001 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3176 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
635浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 09:04 , Processed in 1.434026 second(s), Total 80, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号