我花了2天时间在和谐文献的仙境中进行了一次大雁追逐。我搜索了5个和谐卷,开发者网站,和声例子。我现在对PPS和输入映射有了更多的了解,但是我并没有回答我最初的问题。下面是我发现的:MHC/PIN管理器:第三卷给出了一个对PIN管理器的很好的描述,但是它没有提到“函数”列以及它是如何定义的以及它是如何被使用的。我不得不采取尝试和错误的方法来理解正在发生的事情。我打开了SPILSPACKBACK演示项目,并查看了第1卷/驱动程序演示中的示例文档。该图(在第1卷)显示了如何在MZ EF启动器套件扩展板上连接输入和输出信号。我检查了PIN管理器定义的引脚69, 121, 98和25,它们分别被正确地定义为SD1I、SD12、SDO1和SDO2。我改变了SDI1让它“可用”。当我点击ICODE按钮时,MHC生成了StasyCon Fig .h,StasyIn.c等的正常文件。但是,这些文件不包含任何对我的信号的引用。保罗建议在某个地方使用一个输入ReMAP函数,因此经过长时间的搜索,我终于找到了文件L。Oct/Apvics/Microchip / Orthy/V2Y05/Apps/Studio/SPI/LoopBuff/固件/SRC/StulySCOFIG/PIC32 MZYEFSKIGITIN DYN/Frrase/Stuts/SrC/SysPosiStSimult.C,包含了IntReRePoP()调用。这是一个惊喜,因为我认为框架文件没有改变MHC -这意味着每个项目可以有不同的框架源代码?回到第5卷/ SPI驱动程序库,我看到主控器和从机之间应该有一个SCK(串行时钟)连接。SPIXLoCuff-Demo示例(和第1卷文档)没有SCK连接。我检查了SPIX多从演示和开发者网站SPI演示,它们也没有显示SCK连接,所以SPI如何在主控和主从之间没有时钟信号的情况下工作?MPLAB X IDE:我尝试使用MPLAX中的find函数在演示项目中跟踪多个参数。一些关键参数无法被跟踪。我认为这些必须是内联源或库调用还是????我认为,当我用枚举参数跟踪PLIB调用时,它可能是另外一回事。围绕这一点花了很多时间。所以,我还没有找到“SPI”的“魔法”,如文档或开发人员网站中描述的那样。
以上来自于百度翻译
以下为原文
I just spent 2 days on a wild goose chase in the fairyland of Harmony documentation. I searched the 5 Harmony volumes, the developer website, and the Harmony examples. I now know more about PPS and InputRemapping but I am no closer to answering my original questions.
Here is what I found so far:
MHC/Pin Manager: Vol. III gives a nice description of the Pin Manager, but it fails to mention the “Function” column and how it is defined and how it is used. I had to resort to trial-and-error methods to understand what was happening.
I opened the spi_loopback demo project and looked at the documentation for that example in Vol. 1/Driver Demonstrations. The figure (in Vol 1) shows how to wire the input and output signals on the MZ EF Starter Kit expansion board. I checked the Pin Manager definitions for pins 69, 121, 98, and 25 and they were correctly defined as SD1I, SD12, SDO1, and SDO2 respectively. I changed SDI1 to make it “Available”. When I clicked the icode button, MHC generated the normal files for system_config.h, system_init.c, etc. However, these files did not contain any references to my signals.
Paul suggested there is an input remap function that is used somewhere, so after a long search, I finally found that the file, located at /Applications/microchip/harmony/v2_05/apps/driver/spi/spi_loopback/firmware/src/system_config/pic32mz_ef_sk_int_dyn/framework/system/ports/src/sys_ports_static.c, contained the InputRemap() calls. This was a surprise to me because I thought the framework files were not changed by MHC — does this means that every project can have different framework source code?
Going back to Vol. 5/SPI Driver Library, I saw that there should be an SCK (serial clock) connection between the master and slave. The spi_loopback demo example (and the Vol. 1 documentation) does not have an SCK connection. I checked the spi_multislave demo and the developer website SPI demo and they do not show an SCK connection either, so how does SPI work without a clock signal between the master and slave?
MPLAB X IDE: I tried to trace a number of parameters in the demo projects using the Find function in MPLAB X. Some of the key parameters could not be traced. I think these must have been inline source or library calls or ???. I think it occurred when I was tracing PLIB calls with enumerated arguments, but it could be something else. Working around this took a lot of time.
So, I still have not found the “magic” that makes SPI work as described in the documentation or on the developer website.