1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,鲍伯,
我使用CYC8KIT-049(42xx)插入我自己的板,它有三个SPI设备共享同一个SCB SPI主机。SS0中的一个是用16位数据来表示摩托罗拉的LED矩阵。在SS1和SS2是两个微芯片CAP1128 CAPSENSE按钮控制器,它也讲摩托罗拉,但具有8位数据。SCB初始化为未配置的。我的代码与SS1的LED矩阵和CAP1128一起工作,并且在SS2中有相同的代码来操作。我也有一个UART吐出调试信息通过USB串行,显示按钮活动。我的问题是PSoC将不运行SS2引脚,它只是坐在高处。我用一个逻辑分析仪来捕捉这个罪犯,并确保它不干扰我的板,我拔出了049个板,仍然没有SS2上的波形。附上我的代码。我已经评论了与LED矩阵和工作CAP1128交互的调用,以简化。如有任何建议,将不胜感激。 CAP+LeDS01F.Cyrj.CaseVo.01.Zip 792.3 K 以上来自于百度翻译 以下为原文 Hi Bob, I am using the CYC8KIT-049 (42xx) plugged into my own board, which has three SPI devices sharing the same SCB SPI Master. The one at SS0 is a LED matrix which speaks Motorola with 16 bit data. At SS1 and SS2 are two Microchip CAP1128 capsense button controllers, which also speak Motorola, but with 8-bit data. SCB is initialized as Unconfigured. My code works with the LED matrix and the CAP1128 at SS1, and I have identical code to operate that at SS2. I also have a UART that spits debug info over the USB serial, showing button activity. My problem is that the PSOC will not operate the SS2 pin, it just sits high. I used a logic analyzer to catch this culprit, and to ensure that it wasn't interference on my board, I unplugged the 049 board and still no waveform on SS2. My code is attached. I've commented out the calls to interact with the LED matrix and the working CAP1128, to simplify. Any advice would be much appreciated.
|
|
相关推荐
21个回答
|
|
看不出任何理由。你检查了PIN是否正确工作了?
鲍勃 以上来自于百度翻译 以下为原文 Can't see any reason. did you check the pin for working correctly? Bob |
|
|
|
嗨,戴夫, 我的问题是,我不能肯定这个组合(SS1= SSEL3和SS3= SSEL1)是如何工作的。从我的理解,SSELX引脚直接连接到相应的SSX信号。因此,我想知道是否有人可以选择通过引脚分配对话框来设置SS1到SSEL3,反之亦然。但是这个假设必须参照参考手册进行检查。 假设SPIMESPILSLaveE.SCORT0、1, 2和3的定义总是等于SSEL0、1, 2和3 PIN的顺序,则应该在范围内看到信号。但是,请检查分析仪。 当做 以上来自于百度翻译 以下为原文 Hi Dave, my problem is that I can't say for sure if this combination (SS1 = ssel3 and SS3 = ssel1) is how it is intended to work. From my understanding, the sselx pins are directly tied to the corresponding SSx signals. So, I wonder if it's intended that someone can choose to set SS1 to ssel3 and vice versa by the pin assignment dialog. But this assumption has to be checked against the reference manual. Assuming that the definition of SPIM_SPI_SLAVE_SELECT0, 1, 2 and 3 always equals to the ssel0, 1, 2 and 3 pin in order, you should see the signals on the scope. However, please check also with the analyzer. Regards |
|
|
|
如上所述,我在049板上拧了一下,确认没有信号。我猜它可能是一个死别针,所以我会发射一个不同的板,看看这是否有区别。谢谢。 以上来自于百度翻译 以下为原文 As mentioned, I did yank the 049 board and verified no signal. I guess it could be a dead pin, so I'll fire up a different board and see if that makes a difference. Thanks. |
|
|
|
子璇ALICE 发表于 2018-11-26 16:00 嗨,拉尔夫, 我将删除SS3,并查看它返回到正确的顺序。我想我可能需要从三个奴隶身上建立起一些东西来看看一个非常简单的版本是否有问题。 戴夫 以上来自于百度翻译 以下为原文 Hi Ralph, I will delete the SS3 and see that it goes back to correct order. I guess I may need to build something up from scratch with three slaves to see if a very simple version has the problem. Dave |
|
|
|
嗨,鲍伯, 所以我换了一个不同的049板,得到了同样的行为。我又用逻辑分析仪再看一遍,看到SS0和SS1的良好传输,但没有确认SS2波形。为了把它带到下一级,我决定消除SS2并在它上面放一个时钟信号,以验证PIN是好的。因此,我在SS2中删除了所有设备的代码,UNN在未配置的SCB中检查了SS2的方框。但是斯皮姆对此并不赞同,其他两个奴隶也没有正常运作。(看起来好像是在用很长的数据词)。SCB的内部代码有问题吗? 谢谢。 戴夫 以上来自于百度翻译 以下为原文 Hi Bob, So I did swap to a different 049 board and got the same behavior. I went all over it again with the logic analyzer and saw good transmissions for ss0 and ss1, but confirmed no ss2 waveform. To take it to the next level I decided to eliminate ss2 and put a clock signal out on it, just to verify the pin is good. So I stripped out all the code for the device at SS2 and un-checked the box for ss2 in the Unconfigured SCB. But the SPIM was not agreeable with this, and did not operate normally anymore for the other two slaves. (Looked like it was trying to use very long data words). Is it possible there's a problem with the internal code for the SCB? Thanks. Dave |
|
|
|
拉尔夫 我花了一大堆时间试图弄清楚发生了什么事。实际上,我建立了与现有代码简化的类比,只是在每个从属通道上进行简单的写和读。但由于某种原因,我不能让它工作(没有SPI引脚上的所有活动!!!)所以我回到了我发给你们的最新代码。去掉了SS3,验证了SS的顺序。然后我花了一些时间在逻辑分析仪上。附件是一个拍摄只是一个广泛的捕捉。我相信我们所看到的是对CabPCA1128B的调用,从所有三个SS行开始低,这可能是当SPIM停止。然后有一个很长的数据突发,我不正确地标记,认为这是对显示器的更新,但它是初始化代码,它是96位长。其次是十二个干净的8位传输。在我所做的所有捕获中,SS1上的唯一活动是当SPI被禁用和其他一些零星和短的下降到零时看到的那些活动。 我被难住了。让我知道如果你有想法我应该试试。再次感谢。 戴夫 20171219-222108JPG 1.2兆字节 以上来自于百度翻译 以下为原文 Ralph, I spent a bunch more time trying to make sense of what's happening. I actually built up what was supposed to be a simplified analogy to the existing code, just putting out simple writes and reads on each slave channel. But for some reason, I can't get it to work (no activity on SPI pins AT ALL!!). So I went back to the most recent code I sent you. Stripped out the SS3 and verified that the SS's seem to be back in order. Then I spent some time on the logic analyzer. Attached is a shot of just a wide-open capture. I believe what we're looking at is a call to CheckCAP1128_B, starting with all three SS lines going low, which is probably when SPIM is stopped. Then there is a long burst of data, which I marked incorrectly, thinking it was an update to the display, but it's the initialization code, which is 96 bits long. It's followed by twelve clean 8-bit transfers. In all the captures I did, the only activity on SS1 were those seen when SPI is disabled and a few other sporadic and short drops to zero. I'm stumped. Let me know if you have ideas I should try. Thanks again. Dave
|
|
|
|
734747535qwe 发表于 2018-11-26 16:40 我建议你去 尝试一个不同的工具包,一个调试功能。调试将揭示我们尚未想到的任何错误。尝试创建一个支持案例,以获得一个柏树工程师的帮助。 鲍勃 以上来自于百度翻译 以下为原文 I would suggest you to
Bob |
|
|
|
734747535qwe 发表于 2018-11-26 16:48 嗨,戴夫, 请参阅附件项目。在这里,我可以看到所有从属选择线的活动。该项目简单地配置SCB 4, 8, 12和16位传输,并发送数据。 然后,与你的代码进行比较,找出错误所在。如果你发现这个问题,请报告。 还有一个问题:您是否已经以任何方式修改了SCB API常量和定义?或者您使用了自己的值和定义来配置SCB吗?如果直接修改了API,可能会导致错误。 我问,因为如果我没记错的话,你是直接从API使用配置结构的。在我的项目中,我使用了一个关于SPIMOSPILYMODE等修改的副本。请参阅我的SPI init函数,并将其与您的结构进行比较。 当做 SCB SPI调试 704.6 K 以上来自于百度翻译 以下为原文 Hi Dave, please see the attached project. Here, I can see activity on all slave select lines. This project simply configures SCB for 4, 8, 12 and 16 bit transmission and sends out data. Then, compare to your code to figure out where the error is. Please report back if you found the issue. One additional question: have you modified the SCB API constants and definitions in any way? Or have you used your own values and definitions for configuring the SCB? If you've modified the API directly, maybe this would cause the error. I ask because if I remember correctly, you're using the configuration structure directly from the API. In my project, I used a copy of it with modification regarding SPIM_SPI_MODE, etc. Please see my SPI init function and compare the struct against yours. Regards |
|
|
|
734747535qwe 发表于 2018-11-26 16:59 鲍勃, 再次感谢你的帮助。我恰巧有一个CY8CKIT-059在一个Mebox盒中等待打开,调试程序添加了,并且一切顺利。我决定尝试交换SS1和SS2引脚,这似乎表明有一个问题,SCB块,结果是相反的CAP1128开始工作,而以前工作的一个没有。所以我把两个项目捆绑在一起,展示了原始和交换的场景,并创建了一个支持案例。 戴夫 以上来自于百度翻译 以下为原文 Bob, Thanks again for the help. I just happened to have a CY8CKIT-059 in a Mouser box waiting to be opened, so debugger added, and all went smoothly. I decided to try swapping the SS1 and SS2 pins and this seemed to show that there is a problem with the SCB block, as the result was that the opposite CAP1128 began to work, and the one that worked before did not. So I bundled two projects up, showing original and swapped scenarios, and created a support case. Dave |
|
|
|
子璇ALICE 发表于 2018-11-26 17:14 谢谢拉尔夫, 我会仔细检查的。我没有修改原来的初始化结构。我做了一个拷贝,在SPIPUTONSO.H头文件中声明,并创建了两个替换变量SPIMESPIXRX8BITXDATAYBITSSYNUM和SPIMOSPIXTX88BITXDATA BITSY NUM,用于数据位的数量。为了在16位初始化,我使用了由工具创建的原始结构,并使用我的交替进行8位初始化。 会回到你身边。 戴夫 以上来自于百度翻译 以下为原文 Thanks Ralph, I'll go through this. I have not modified the original initialization structure. I made a copy, declared in the SPIButtons.h header file, and created two substitute variables SPIM_SPI_RX_8BIT_DATA_BITS_NUM and SPIM_SPI_TX_8BIT_DATA_BITS_NUM for number of data bits. For initializing at 16 bits, I use the original structure created by the tool, and use my alternate for 8-bit initialization. Will get back to you. Dave |
|
|
|
ncmza 发表于 2018-11-26 17:33 嗨,鲍伯, 今天上午我看到我的案例(技术支持MyCase00394760)已经被分类为取消,建议我回到在线资源。附件是我上传的内容。下面是案例中的文本。我不知道下一步该怎么办。谢谢。 我使用CYC8KIT-049(42xx)插入我自己的板,它有三个SPI设备共享同一个SCB SPI主机。SS0中的一个是用16位数据来表示摩托罗拉的LED矩阵。在SS1和SS2是两个微芯片CAP1128 CAPSENSE按钮控制器,它也讲摩托罗拉,但具有8位数据。SCB初始化为未配置的。我的代码与SS1的LED矩阵和CAP1128一起工作,并且在SS2中有相同的代码来操作。我也有一个UART吐出调试信息通过USB串行,显示按钮活动。我的问题是PSoC将不运行SS2引脚,它只是坐在高处。我用一个逻辑分析仪来捕捉这个罪犯,并确保它不干扰我的板,我拔出了049个板,仍然没有SS2上的波形。从那时起,我创建了一个附属项目,我相信这表明了吸烟。我所做的是将SS1和SS2的两个引脚反向,这表明问题起源于SCB块,而不是在引脚或外部硬件上。在Bob Marlow的建议下,我开始使用CyPress调试器和049个板(我买了一个059的板并中断了调试器板)。因此,在附加工作区中的两个项目没有实现为可引导加载。谢谢你的帮助。-戴夫 SPICAP+DISPLAY02.CYWRK.SARVEVE01.ZIP 4.1 K 以上来自于百度翻译 以下为原文 Hi Bob, I see this morning that my case (Tech Support MyCase 00394760 ) is already classified as CANCELLED, recommending I go back to online resources. Attached is the content I had uploaded. Below is the text from the case. I'm not sure what to do next. Thanks.
|
|
|
|
734747535qwe 发表于 2018-11-26 17:47 拉尔夫 再次感谢您提供的代码。我确认所有波形运行良好。我的书写方式一定有些问题。我将用你的作为重新开始我的项目的起点。 以上来自于百度翻译 以下为原文 Ralph, Thanks again for providing the code. I confirmed that all waveforms are fine running this. There must be some problem in the way mine is written. I'll use yours as a starting place to re-write my project. |
|
|
|
734747535qwe 发表于 2018-11-26 17:56 嗨,戴夫, 您是否尝试更新最新的SCB组件版本和/或使用最新的PSoC Creator版本? 根据寄存器数据表,从地址选择值为0~3。 我检查了头文件,您当前的SIP控制寄存器的从属选择值是: SS0 0 SS1 3 SS2 1 SS3 2 也许,这与此有关。就我所见,在最新的组件版本中,地址也是按顺序排列的。 当做 以上来自于百度翻译 以下为原文 Hi Dave, have you tried to update to the newest SCB component version and/or using the latest PSoC Creator release? According to register datasheet, the slave address values are 0-3 in order for the slave select lines. I checked the header files, your current slave select values for the SPI control register are: SS0 0 SS1 3 SS2 1 SS3 2 So, maybe it's related to this. As far as I can see, in the newest component versions, the addresses are also in order. Regards |
|
|
|
嗨,Ralf,我终于回到了一个简单的项目中,演示了SCB组件的SPI功能异常。我有三个SS线路,我的代码与CAP1128电容式感测装置对话,在SS1和SS2上碰巧有两个。在附加的项目中,我可以选择SS2上的设备,并且得到适当的通信,但是它不是SS2上的设备,而是SS1上的设备。当选择SS1时,SS波形不会发生,并且不可能进行通信。为了证明没有硬件问题防止SS1拉低,我还尝试了物理倒换硬件,以便当选择SS2时,相反的CAP1128设备连接到SS1。它也能正确通信。我还附上每个场景的波形照片(逻辑分析仪)。 20180330091127.JPG 563.5 K 20180330009065 0.JPG 576.7 K Cab-OnLo.01B.Cyrj.CaseVo.01.Zip 1.5兆字节 以上来自于百度翻译 以下为原文 Hi Ralf, I'm finally back with a simple project that demonstrates dysfunction in the SPI functionality of the SCB component. I have three SS lines and my code talks to a CAP1128 capacitive sensing device, which there happen to be two of, on SS1 and SS2. In the attached project, I can select the device on SS2 and I get proper communication, however it's not with the device on SS2, it's with the device on SS1. When I select SS1 the SS waveform does not happen, and no communication is possible. Just to prove that there is no hardware problem preventing the SS1 from pulling low, I have also tried physically reversing the hardware, so that the opposite CAP1128 device is connected to SS1 when SS2 is selected. It also communicates correctly. I'm also attaching photos of the waveforms in each scenario (on logic analyzer).
|
|
|
|
734747535qwe 发表于 2018-11-26 18:19 嗨,鲍伯, 谢谢。我更新到当前的创建者4.1,并做了组件更新,将SCB从3.2到4。虽然没有快乐。 我不熟悉你在哪里看到和看到无序的SS值。我没能找到那样的东西。听起来像是我控制之外的东西……?如果我有办法把它们整理好,我需要一些辅导。 再次感谢。 戴夫 以上来自于百度翻译 以下为原文 Hi Bob, Thanks for that. I updated to the current Creator 4.1 and did Component update, which took the SCB from 3.2 to 4.0. No joy though. I'm not familiar with where you're looking and seeing the out of order SS values. I wasn't able to find anything like that. Sounds like something that's outside of my control though...? If there's a way for me to put them in order, I'll need some coaching. Thanks again. Dave |
|
|
|
子璇ALICE 发表于 2018-11-26 18:40 你可以尝试另一种方法。代替使用未配置的SCB,可以使用配置为3个SS行的SPI。 看看这是否可行。 鲍勃 以上来自于百度翻译 以下为原文 You might try a different approach. Instead of using an unconfigured SCB you may use one that is configured as SPI with 3 ss lines. See if that works. Bob |
|
|
|
嗨,鲍伯, 问题是,CAP1128是8位,而Max 7221是16位。我猜你的想法让我怀疑我是否可以使用16位模式的上限,他们将不会看到最重要的字节。一个尝试…在此之前,我想我将建立一个我现有项目的副本,但是这次,制作Max SS2。我看到了一些其他的特点与现有的项目,它不再回应交换引脚上的上限。现在奇怪的是,CAP1128YB(U5)总是工作,尽管交换SS引脚,而CAP1128A A(U11),这原本是一个工作(在SS1),现在从来没有工作。所以我想从头开始建立起来。 再次感谢。 以上来自于百度翻译 以下为原文 Hi Bob, Problem with that is, the CAP1128's are 8-bit and the MAX7221's are 16-bit. I guess your thought makes me wonder if I can use 16-bit mode with the CAPs and they would just not see the most significant byte. One experiment to try... Before that, I think I'll build up a duplicate of my existing project, but this time, make the MAX SS2. I'm seeing some other peculiarities with the existing project, where it no longer responds to swapping the pins on the CAPs. Weird thing now is, the CAP1128_B (U5) ALWAYS works, despite swapping SS pins, and the CAP1128_A (U11), which was originally the one that worked (on SS1), now never works. So I guess a from-scratch build-up is called for. Thanks again. |
|
|
|
子璇ALICE 发表于 2018-11-26 18:40 OnEdAsHeTwite8TeNeNe148511SrReEB: 嗨,鲍伯, 谢谢。我更新到当前的创建者4.1,并做了组件更新,将SCB从3.2到4。虽然没有快乐。 我不熟悉你在哪里看到和看到无序的SS值。我没能找到那样的东西。听起来像是我控制之外的东西……?如果我有办法把它们整理好,我需要一些辅导。 再次感谢。 戴夫 如果你指的是我的帖子,我是Ralf =) 关于更新,可能需要删除生成的SCB API文件,因为即使更新,也可能保留SS行的值。 我在SPimySPixUART.H文件中找到了非顺序SS值: /*SPI从属选择常数*/ 定义SpimthSPILSLaveE.StReT0(SPIM1) 定义SpimthSPixSLaveSeLt1(SPIM1) 定义SpimthSPixSLaveSeLeT2(SPIM1) 定义SpimthSPixSLaveSeLeT3(SPIM1) 现在,如果您检查SPIMYSCBS*SS0PosiScript的值到SPimyScBysSS3PosiPosits,您将看到值是0, 3, 1,2。如果我正确地理解了寄存器手册,SS0到SS3的值应该是0, 1, 2和3的顺序。 在CyFiter中定义了SPIM1 SCBSH SSX定位。 在您的项目中,它们定义如下: 定义SpimaScBasys0-π0 0U 定义SpimaScbs1β3U 定义Spima Scbs2β1U 定义SpimsCbs3S3-位2U 我清理了你的项目,更新了组件,重新构建,然后检查了Cyfter。现在,结果是: 定义SpimaScBasys0-π0 0U 定义SpimsCbs1β1U 定义SpimsCbs2S2a定位2U 定义SpimsCbs3S3-π3U 当做 以上来自于百度翻译 以下为原文 onedashtwoeightone_1448511 schrieb:If you're referring to my post, I'm Ralf =) Regarding the update, maybe it's needed to delete the generated SCB API files, because even with the update it might be that the values for SS lines might be preserved. I found the non-order SS values in the SPIM_SPI_UART.H file: /* SPI slave select constants */ #define SPIM_SPI_SLAVE_SELECT0 (SPIM_SCB__SS0_POSISTION) #define SPIM_SPI_SLAVE_SELECT1 (SPIM_SCB__SS1_POSISTION) #define SPIM_SPI_SLAVE_SELECT2 (SPIM_SCB__SS2_POSISTION) #define SPIM_SPI_SLAVE_SELECT3 (SPIM_SCB__SS3_POSISTION) Now, if you check the values for SPIM_SCB__SS0_POSISTION to SPIM_SCB__SS3_POSISTION, you'll see that the values are 0, 3, 1, 2. If I understand the register manual correctly, the values for SS0 to SS3 should be 0, 1, 2 and 3 in order. SPIM_SCB__SSx_POSISTION are defined in cyfitter.h. In your project, they're defined as follows: #define SPIM_SCB__SS0_POSISTION 0u #define SPIM_SCB__SS1_POSISTION 3u #define SPIM_SCB__SS2_POSISTION 1u #define SPIM_SCB__SS3_POSISTION 2u I cleaned your project, updated the components, build again and then checked cyfitter.h. Now, the result is: #define SPIM_SCB__SS0_POSISTION 0u #define SPIM_SCB__SS1_POSISTION 1u #define SPIM_SCB__SS2_POSISTION 2u #define SPIM_SCB__SS3_POSISTION 3u Regards |
|
|
|
734747535qwe 发表于 2018-11-26 19:24 拉尔夫 再次感谢大家的帮助。看来你是个很好的嫌疑犯,但我现在更新了Cyfter。H按正确的顺序阅读。改变的是现在SS2确实有一个波形,但是SS1丢失了它的波形。在逻辑分析仪上再次检查。看到了一组涉及SS2的传输的漂亮波形,但不是SS1。我正在上传我的最新版本,顺便说一下,它已经不再是可引导的了。如前所述,我现在正在使用一个059工具箱调试器。 戴夫 CAP+LeDS01K.Cyrj.CaseVo.01.Zip 2.2兆字节 以上来自于百度翻译 以下为原文 Ralph, Thanks again for the help on this. Seemed like a good suspect you had, but I've now updated and cyfitter.h reads POSISTION in the right order. What changed is that now ss2 does have a waveform, but ss1 is missing its waveform. Checked it all again on the logic analyzer. Saw a beautiful set of waveforms for a transfer involving ss2, but not ss1. I'm uploading my latest, which, by the way is no longer a bootloadable. As mentioned before, I'm using an 059 kit debugger now. Dave |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2105 浏览 1 评论
1851 浏览 1 评论
3669 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1786 浏览 6 评论
1536 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
568浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
422浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
437浏览 2评论
383浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
915浏览 2评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 05:13 , Processed in 1.560399 second(s), Total 82, Slave 76 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号