1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我在Linux Microcontroler下使用CR95HH。
在这种情况下,我使用UART端口进行通信(不是SPI),默认BaudRate是57600,并且工作正常,但是当我尝试将波特率更改为最大速度(数据表提到最大2 Mbps)时,我可以找不到合适的程序。 第38页 数据 片 有了命令0x0A的描述,据此,我们需要用一个公式来计算BaudRate ==> '13 .56 /(2 *< BaudRate> +2)Mbps',其中'BaudRate'是0~255之间的任何数字。如果我应用这个公式,没有一个数字给我的确切波特率比Linux支持。无论如何,我使用最接近linux Standard。但唯一比工作的是默认(B57600) 顺便说一下,我在linux下使用'C' 我的实际程序是: 1.-在57600打开Uart端口 2.-将WakeUp命令发送到设备 3.-发送新的Baudrate命令(0x0A 0x01 0x05)==> 0x05表示1.13 Mbps(Linux更接近B1152000) 4.-关闭Uart端口 5.-在1152000打开UART 6.-开始使用...... 我尝试了许多不同的速度,但唯一的工作是默认。 任何想法? 支持Linux UART BAUD(来自termios.h): ================= 。 。 。 #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 ======================= 以上来自于谷歌翻译 以下为原文 I'm Using the CR95HH under a linux Microcontroler. in this case, I'm using the UART port to communicate (not SPI), the default BaudRate is 57600, and works fine, but when I try to change the Baud rate to maximum Speed (Datasheet mention 2 Mbps max), I can't find the right procedure to do that. the page 38 of Data sheet have the description of command 0x0A, according with this, we need to use a formula to calculate the BaudRate ==> '13.56 /(2* By the Way, I'm using 'C' under linux my Actual procedure is: 1.- Open Uart port at 57600 2.- Send WakeUp command to Device 3.- send new Baudrate command (0x0A 0x01 0x05) ==> 0x05 for 1.13 Mbps (Linux more closer B1152000) 4.- Close Uart Port 5.- Open UART at 1152000 6.- Start Using... I try many different speeds but the only one than works is the default. any Idea? the Linux UART BAUD supported are (from termios.h): ================= . . . #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017======================= |
|
相关推荐
3个回答
|
|
你好路易斯,
使用ST的MB1054B RF收发器演示板和配置有UART的CR95HF意味着将SS10和SS11输入引脚设置为00并配置STm32 USART通信我已经重现了上述顺序。 所有工作都是默认值57600到2.26Mbps我用示波器检查了时序,2个探头连接到STm32提供的TX部分和CR95HF提供的RX反馈。 对于我的样本,以下是在UART波特率设置之后对echo命令进行的以下测量。 加载的Valuefreq calculatedfreq预期Linux波特率TX 8bits(us)来自STM32RX 8位(us)来自CR95HFTX速率测量(bps)RX速率测量(bps)delta RX /波特率linux% 316950001500000 4.719417142851695131195130.70.130087 5113000011520007.117.07011125176113152620474.280.017773 6968571.4310000008.2218.2545973117.6969168.330831.670.030832 B56500057600014.21714.1243562706.6566399.89600.2490.016667 D484285.7150000016.44116.5128486588.4484472.715527.350.031055 E45200046080017.77517.7086450070.3451757.99042.0970.019623 1C233793.123040034.23234.1663233699.5234148.93748.8540.016271 3A114915.2511520069.55169.5833115023.5114970.1229.8850.001996 7557457.62757600139.009139.17657550.2357481.17118.82510.002063 我建议您在编程UART速度后执行echo命令时执行序列并测量RX和TX线上的数据速率。尝试使用3A和05,它似乎是LINUX值中最接近的。 希望它会有所帮助 RegardsPB 以上来自于谷歌翻译 以下为原文 Hello Luis, Using a MB1054B RF transceiver demonstration board from ST with a CR95HF configured with UART means setting the SS10 and SS11 input pins to 00 and the STm32 USART communication configured I have reproduce your sequence described above. All was working from default value 57600 up to 2.26MbpsI have checked the timings with an oscilloscope and 2 probes connected to TX part provided by the STm32 and RX feedbacks provided by the CR95HF. With the sample I have, here are the following measurements done on an echo command after the UART baud rate setting. Loaded Valuefreq calculatedfreq expected Linux baud rateTX 8bits (us) from STM32RX 8 bits (us ) from CR95HFTX rate measured (bps)RX rate measured (bps)delta RX/Baud rate linux% 316950001500000 4.719417142851695131195130.70.130087 5113000011520007.117.07011125176113152620474.280.017773 6968571.4310000008.2218.2545973117.6969168.330831.670.030832 B56500057600014.21714.1243562706.6566399.89600.2490.016667 D484285.7150000016.44116.5128486588.4484472.715527.350.031055 E45200046080017.77517.7086450070.3451757.99042.0970.019623 1C233793.123040034.23234.1663233699.5234148.93748.8540.016271 3A114915.2511520069.55169.5833115023.5114970.1229.8850.001996 7557457.62757600139.009139.17657550.2357481.17118.82510.002063 I suggest you to execute your sequence and measure on RX and TX line the data rate when executing an echo command after programming the UART speed. Try with 3A and 05 it seems to be the closest of the LINUX values. Hope it will help RegardsPB |
|
|
|
嗨彼得
我有NFC工作 CR95HF UART的速率为1Mbps,现在已足够了。谢谢。 现在我需要CR95HF和TAG(NFC / RFID ST25DV64K)的数据速率 此时我的通信速率为@ 26Kbps,但我们需要53 kbps(支持53 kbit / s的数据速率, 快速命令)。 当我选择那个速度发送选择协议命令时(第5.4节“协议选择命令(0x02)描述”) &GT;&GT;&GT; 0x02020115 &LT;&LT;&LT;为0x0000 在发送此命令并接收(接受命令)后,我忘记了与TAG的通信, 它是在TAG或NFC读卡器上启用此53Kbps速度的任何其他命令吗? 谢谢 以上来自于谷歌翻译 以下为原文 Hi Peter I have working the NFC CR95HF UART at 1Mbps, that is enough for now. Thank you. Now I need the data rate speed from CR95HF and TAG (NFC/RFID ST25DV64K) At this time the I have communication @ 26Kbps, but we need 53 kbps (Supports the 53 kbit/s data rate with Fast commands). when I select that speed sending Select Protocol command (section 5.4 'Protocol Select command (0x02) description') >>>0x02020115 <<<0x0000 after send this command and receive (accept command), I'm loosing the communication with TAG, it is any other command to enable this 53Kbps speed at TAG or NFC reader? Thank you |
|
|
|
嗨路易斯,
如果您使用的是ST25DV64K,请参考芯片数据表以检查53kbps支持的命令。 http://www.st.com/resource/en/datasheet/st25dv64k.pdf 使用CR95HF,您必须在执行Fast命令之前通过protocol select命令切换速度。然后回到标准速度。 RegardsPYB 以上来自于谷歌翻译 以下为原文 Hi Luis, If you are using the ST25DV64K please refer to the chip datasheet in order to check the commands supported at 53kbps. http://www.st.com/resource/en/datasheet/st25dv64k.pdf Using the CR95HF you will have to switch the speed via the protocol select command just before executing your Fast command. then go back to the standard speed. RegardsPYB |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2724 浏览 1 评论
3237 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1807 浏览 1 评论
3646 浏览 6 评论
6034 浏览 21 评论
1334浏览 4评论
209浏览 3评论
197浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
350浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
442浏览 2评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 22:41 , Processed in 1.153982 second(s), Total 80, Slave 64 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号