Skip to main content
Visitor II
April 9, 2018
Solved

CR95H UART

  • April 9, 2018
  • 3 replies
  • 849 views
Posted on April 09, 2018 at 13:34

Hi, i am using CR95H RFID CLICK module with raspberry pi3.I am using UART for communication.

I connected,

   SSI_1   =>   GND

   SSI_0   =>   GND

   TX        =>    RX

   RX        =>   TX

   VIN       =>   3.3X

   GND     =>    GND.

 for waking up i am sending 0x00 and then i send echo cmd but i didnt any response.can any one help me out i new to these modules

#include<bcm2835.h>

#include <string.h>

#include <unistd.h>

#include <sys/types.h>

#include <sys/stat.h>

#include <fcntl.h>

#include <termios.h>

#include <sys/ioctl.h>

#include<stdio.h>

uint8_t buf2[11],buf1;

void send_data(uint8_t buf1)

{

int fd;

fd = open('/dev/ttyS0', O_RDWR, O_NOCTTY);

fd = write(fd, &buf1, 11);

if (fd == -1) {

printf('failed to write the file');

}

usleep(100000);

close(fd);

}

void recv_data()

{

int fd;

fd = open('/dev/ttyS0', O_RDWR, O_NOCTTY);

if (fd == -1) {

printf('failed to open the file');

}

fd = read(fd, buf2, 17);

if(buf2[0]==0x55)

{

printf('ECHO');

}

printf('%x', buf2);

close(fd);

}

int main(void)

{

bcm2835_init();

delay(10);

send_data(0x00);

usleep(10);

for(int i=0;i<10;i++)

{

send_data(0x55);

recv_data();

delay(50);

}

}
    This topic has been closed for replies.
    Best answer by Peter Boringer
    Posted on April 23, 2018 at 11:44

    Hello John,

    For your information the default baud rate set on the CR95HF is 57600 bps.

    Can you please tell which baud rate is programmed for the UART communication.

    Are you sure that you will comply with the specs for your negative pulse sent on IRQIN/RX pin.

    Regards

    PB

    3 replies

    Super User
    April 9, 2018
    Posted on April 09, 2018 at 16:22

    i am using CR95H

    That's not an STM32 - so why didyou post this in the STM32 forum?

    EDIT

    Moved by moderator to  

    https://community.st.com/community/st25-nfcrfid-tags-and-readers

     > 

    https://community.st.com/community/st25-nfcrfid-tags-and-readers/content?filterID=contentstatus%5Bpublished%5D~objecttype~objecttype%5Bthread%5D

    Super User
    April 9, 2018
    Posted on April 09, 2018 at 16:44

    ... with raspberry pi3. I am using UART for communication ... 

    So are you familiar with using the Raspberry Pi serial comms in general?

    Visitor II
    April 23, 2018
    Posted on April 23, 2018 at 11:44

    Hello John,

    For your information the default baud rate set on the CR95HF is 57600 bps.

    Can you please tell which baud rate is programmed for the UART communication.

    Are you sure that you will comply with the specs for your negative pulse sent on IRQIN/RX pin.

    Regards

    PB