2018-03-22 11:38 AM
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*<BaudRate>+2) Mbps', where 'BaudRate' is any number from 0 ~ 255.If I apply this formula, no one number give me the exact Baudrate than Linux support. in any case, I use the most closer to linux Standard. but the only one than works is the Default (B57600)
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=======================
Solved! Go to Solution.
2018-04-03 07:17 AM
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
2018-03-27 08:12 AM
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 helpRegardsPB
2018-04-02 01:01 PM
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
2018-04-03 07:17 AM
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