-1

I'm developing an embedded app, written in C, using a M16C/28 uC from Renesas.

The app manages two simple task:

  1. RFID for detection and reading MIFARE tags. ( Using HW: Mf500 from NXP ). The uC handles whole FW implementation.
  2. To deal with a RS485 frame protocol as slave. ( This app, have to be able to process RS485 frames every 10ms ).

The RFID implementation contains blocking code and the time response to detect a RFID tag is about 15ms. This causes RX reception buffer overflows on the RS485 processing.

My questions are as follows:

  • Is it normal to deal with such time responses in the RFID world?
  • Should I use a RTOS to preempt RFID task to meet RS485 frames requirements?
  • Should I use an external uC acting as host controller to release the load of the RFID manager uC?

Thanks in advance

Gerhard
  • 6,850
  • 8
  • 51
  • 81
GenGen
  • 1

2 Answers2

0

To answer your questions:

  1. Depends
  2. You could use a RTOS.
  3. You could use an additional uC.

Better options would be to:

  1. Use DMA on serial communications.
  2. Make the RFID code non blocking.
  3. Do more in your serial interrupt.
Gerhard
  • 6,850
  • 8
  • 51
  • 81
0

The response time varies depending on the type of card/rfid that your are communicating with. I don't know the timings of Mifare RFIDs but 15 ms does not seem to be bad.

In your situation, you may have more requests coming from RS485 than you can handle on the RFID part. You can use queues or FIFOs to store the input requests so that you can treat them later on, according to the physical limitations of your system.

Using an RTOS can help but usually, they are not free. Plus, you may have to port it to your platform if it is not already supported. If all your firmware does is handling RS485 requests and communicating with the RFID, you should sort this out with interruptions to store the incoming commands and a loop to process them separately.

And for the second uC, it's like the RTOS. It can help but might not be the right solution in this scenario (you will have to manage 2 firmwares, a communication protocol or a FIFO between uCs, it will cost twice the price, ...).

Cem.S
  • 1,001
  • 10
  • 15