完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
当我尝试发布时,我一直被拒绝访问!所以…我每次发布一点,看看防火墙是什么触发的。显然,我不能发布剩下的代码。所以,如果有人想看的话,告诉我,如果我还没有做的话,我会附上的。根据触发防火墙的帖子,“char”是一个触发字?不管怎样,如果有人能帮忙,请看下面的帖子。谢谢!
以上来自于百度翻译 以下为原文 I keep getting Access Denied when I try to post!! So... I'm posting a little at a time to see what triggers the firewall. Apparently, I can't post the rest of my code. So, if anyone wants to look at it, let me know and I'll attach it if I haven't already done so. According to the post about triggering firewalls, 'char' is a trigger word? Anyway, if anyone can help, please see below post. Thanks! |
|
相关推荐
13个回答
|
|
这可能是你想发表的。你看到了:触发防火墙的表达式。
以上来自于百度翻译 以下为原文 It's probably what you're trying to post. Have you seen: Expressions which trigger the firewall |
|
|
|
我将张贴一位一次…嗨,我正在阅读文件从一个新的微型SD卡使用PIC32启动器套件和多媒体扩展板II(MEB II)。我正在读取一个文件并显示在一个128×32的RGB LED显示屏上。它运行良好(计划优化更多的速度)使用波特率低于700千赫,但当我把速度改变到上面的任何初始化后,它被卡住(我会强调它在代码-见SPI2Read())。文件说要初始化卡在400千赫,我这样做。我已经证实波特率确实在一个范围内转换。这些信号看起来很干净,而且相当平直。我的代码张贴在下面,我注意到它被卡在哪里。它只是不断尝试发送,好像卡没有接收或发送任何东西回来。我有什么遗漏了吗?MEB II板上有什么东西会弄脏这个吗?如果有人知道这个,我会很感激的。相关代码如下:SPI.cFr.c
以上来自于百度翻译 以下为原文 I'll post one bit at a time... Hi, I'm reading files from a new Micro SD card using the PIC32 Starter Kit and Multimedia Expansion Board II (MEB II). I'm reading a file and displaying it on a 128 x 32 RGB LED display. It's working fine (planning on optimizing for more speed) using a baud rate below ~700KHz, but when I change the speed to anything above that after initialization, it gets stuck (I'll highlight it in the code - see SPI2Read()). The documentation says to initialize the card at 400KHz, which I do. I've confirmed that the baud rate does switch with a scope. The signals look clean and fairly square. My code is posted below and I note where it gets stuck. It just keeps trying to transmit as if the card isn't receiving or sending anything back. Is there something I'm missing? Is there something on the MEB II board that could mess this up? If anyone has a clue about this, I would appreciate it. Relevant code posted below: spi.c void InitSPI(void) { int rData, i; IEC4CLR = 0x1c000; // disable all interrupts SPI2CON = 0; // Stops and resets the SPI2. rData = SPI2BUF;// clears the receive buffer IFS4CLR = 0x1c000; // clear any existing event IPC35CLR = 0x1f000000; // clear the priority IPC35SET = 0x0d000000; // Set IPL=3, Subpriority 1 SPI2BRG = 124;// buad rate = PBCLK2 (100MHz) / ((SPI2BRG + 1) / 2) or 400KHz SPI2STATCLR = 0x40;// clear the Overflow SPI2CON = 0x8220;// SPI ON, 8 bits transfer, SMP=1, Master mode // from now on, the device is ready to transmit and receive data } void ChangeSPISpeed(unsigned int newspeed) { DESELECT SPI2CON = 0; // Stops and resets the SPI2. SPI2BRG = 4; // 10 MHz - I've tried other speeds SPI2CON = 0x8220;// SPI ON, 8 bits transfer, SMP=1, Master mode SELECT } unsigned char SPI2_Read(void) { SPI2BUF = 0xff; while (!SPI2STATbits.SPITBE); // *********** This is where it gets stuck at baud rate > ~700KHz *********** return SPI2BUF; } // Transmit a byte via SPI channel 2 void SPI2_Xmit( unsigned char data ) { SPI2BUF = (unsigned short)data; // place the data in the buffer while (!SPI2STATbits.SPITBE); // wait until the transmit buffer is empty (data has been sent) while (SPI2STATbits.SPIRBE); // wait until a byte is received crap = SPI2BUF; // byte received during transmit is junk } // Send a command packet unsigned char Cmd_Send ( unsigned char cmd, /* Command unsigned char */ unsigned int arg, /* Argument */ unsigned char crc /* CRC */ ) { if (cmd & 0x80) // if the command is an ACMD (application command), send CMD55 first { cmd &= 0x7F; // all ACMDs have the 7th bit set, so mask it out r = Cmd_Send(CMD55, 0, 0xff); // send CMD55 first if (r > 1) return r; // response should be 0 or 1 } DESELECT SELECT while(SPI2_Read() != 0xff); // give the SD card some time to prepare for the next instruction and flush the bytes or something Timer1 = 10; while (Timer1); /* Send command packet */ SPI2_Xmit(cmd); /* Command */ SPI2_Xmit((unsigned char)(arg >> 24)); /* Argument[31..24] */ SPI2_Xmit((unsigned char)(arg >> 16)); /* Argument[23..16] */ SPI2_Xmit((unsigned char)(arg >> 8)); /* Argument[15..8] */ SPI2_Xmit((unsigned char)arg); /* Argument[7..0] */ SPI2_Xmit(crc); t = 10; do { r = SPI2_Read(); } while ((r & 0x80) && --t); // read until bit 7 is not set return r; } file.c //test |
|
|
|
嗨,你有PIC32启动套件:PIC32 MZ EF启动器套件?当做
以上来自于百度翻译 以下为原文 Hi , Which PIC32 starter kit do you have : PIC32MZ EF starter kit ? Regards |
|
|
|
是的,这是一个PIC32 MZ EF非密码启动套件。200 MHz PIC32 MZ2048 EFH CPU
以上来自于百度翻译 以下为原文 Yes, it's a PIC32MZ EF non-crypto Starter Kit. 200MHz PIC32MZ2048EFH CPU |
|
|
|
伟大的。。。试图上传.c文件,我得到“访问拒绝”。我能在这个网站上做什么?
以上来自于百度翻译 以下为原文 Great... trying to upload .c files and I get "Access Denied". What CAN I do on this site? |
|
|
|
|
|
|
|
哪些文件?符合SD标准。卡在DO开模模式下启动,所以速度必须限制直到初始化。
以上来自于百度翻译 以下为原文 Which documentation ? Regards The SD standard. The card starts in open-drain mode on DO, so the speed has to be limited until initialised. |
|
|
|
可能的是,如果卡仍然在开式排水模式,这将解释症状…
以上来自于百度翻译 以下为原文 Possibly if the card is STILL in open-drain mode, that would explain the symptoms ... |
|
|
|
重复,最好继续这里HTTP//www. MICCHIP.COM/FUMMS/M1010106ASPX
以上来自于百度翻译 以下为原文 Duplicate, better continue here http://www.microchip.com/forums/m1010106.aspx |
|
|
|
你使用空闲时钟(CKP)0还是1?通常情况下,它将是SMP=1,CKE=0,CKP=1或SMP=0,CKE=1,CKP=0。
以上来自于百度翻译 以下为原文 Are you using idle clock (CKP) 0 or 1? Normally it would be either SMP=1,CKE=0,CKP=1 OR SMP=0,CKE=1,CKP=0 |
|
|
|
我会检查一下,但是我会回应Atttp://www. McCHIP.COM/FUMMS/M1010106ASPX。
以上来自于百度翻译 以下为原文 Lurch, I will check, but I will respond at http://www.microchip.com/forums/m1010106.aspx. Sorry for the duplicate, it was giving me a fit with "Access Denied". |
|
|
|
我发现有必要允许更长的时间来应对。这里的延迟很大程度上取决于SPI速度。此外,您应该理想地读取SD卡的能力,以检查它可以处理您想要使用的比特率。
以上来自于百度翻译 以下为原文 t = 10; do { r = SPI2_Read(); } while ((r & 0x80) && --t); // read until bit 7 is not set return r; I found it necessary to allow much longer for responses. The delay here is very much dependent on SPI speed. Also, you should ideally read the capabilities of the SD card to check that it can handle the the bit rate you want to use. |
|
|
|
嘿,我发现问题了,孩子,我觉得自己像个白痴!这是一个定时器中断,我必须刷新一个小显示器。在较低的频率下,中断可以在接收缓冲器溢出并导致问题之前完成。谢谢你的提示。在论坛上蠕动;
以上来自于百度翻译 以下为原文 Hey, I found the problem and, boy, do I feel like an idiot! It was a timer interrupt that I have to refresh a small display. At lower frequencies, the interrupt could finish before the receive buffer would overflow and cause problems. Thanks for the tips. |
|
|
|
只有小组成员才能发言,加入小组>>
5238 浏览 9 评论
2028 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3204 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
774浏览 1评论
664浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
592浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
674浏览 0评论
574浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 18:08 , Processed in 1.542252 second(s), Total 101, Slave 84 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号