This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TRF7970A: MSP430F5529LP UART Communication

Part Number: TRF7970A
Other Parts Discussed in Thread: MSP-EXP430F5529LP,

Hello,

I'm working with the MSP-EXP430F5529LP and the DLP-7970A. I'm using the SLOA227 for Card Emulation of an ISO14443-4 Type A tag. I am trying to figure out how to use the MSP430's UART in order to transmit, to a host computer, what I've received from an initiator and then respond accordingly. I'm not very familiar with the COM ports that the SLOA227 employs (or in general for the MSP dev boards).

I've attempted to use the Serial_print*() APIs but I'm unable to receive anything when using a terminal application with none of the three ports that appear: USB Serial Device, MSP Application UART1, and the MSP Debug Interface. How can I create a com port to just transmit and respond to what the initiator is sending the TRF7970A?

Thank you

  • Hello Wilmer,

    You would need to use Peer-to-Peer to do that. You can't just reply to an initiator in Card Emulation mode. The initiator has 100% control of the communication flow and only the initiator can tell the device in Card Emulation mode when to send it data. There is no way to flag the initiator you want to send data.

    Peer-to-Peer allows for bi-directional communication where you can choose to send data to the initiator though, and for that the hooks are in place in the code already to do what you asked. Right now it is limited to the GUI input and thus ASCII characters but you could definitely expand on that without much effort.

  • Oh, no I don't want to initiate communication with the device in CE mode. The flow I'm trying to achieve is:

    Initiator begins Comm. -> Dev board (in CE mode) ACKS -> Initiator sends data -> Dev board sends data to Host computer and processes it. -> Host computer sends data back to Dev board -> Dev board sends response to initiator -> ... -> ...

    I just wanted to know what the easiest way to do this is; through UART, storage device emulation, etc...? Preferably using the existing code in the SLOA227

  • Hello Wilmer,

    Wilmer Suarez said:
    Initiator begins Comm. -> Dev board (in CE mode) ACKS -> Initiator sends data -> Dev board sends data to Host computer and processes it. -> Host computer sends data back to Dev board -> Dev board sends response to initiator -> ... -> ...

    Initiator begins comm. - okay (I would say initiate the connection here though)

    Dev board ACKs - okay

    Initiatior sends data - okay

    Dev board sends data to host - okay

    Host sends data back to dev board - missing piece(?)

    Dev board sends response to initiator - Doesn't work as you think

    The only way for the dev board to send the response back is for the initiator to ASK for it, and there are timeouts involved.

    So you have to have the data ready to send when the initiator requests it. That is what I meant by initiate communication - the Card Emulation device cannot send data without the initiator explicitly asking for it, and when the request is made, there are timeouts involved.

    Therefore you need a closed loop system where the initiator delays it's request for data until all the prior steps are handled.

    That is why this plug does not exist in the application as is.

    Are you in a situation you can have the initiator wait and then later request for the data?

  • After the initiator initiates the connection and the dev board ACKs, the Initiator will then send an APDU over requesting data, so the initiator is waiting for a response. So the only issue here, i think, would be if the communication between the host computer and the dev board takes too long.

    Apologies for not making things clearer.

  • Hello Wilmer,

    Okay well that's still going to be tricky to do because of the lag time and I don't really fully understand the point of using CE over P2P, but you should be able to alter the application enough to do so.

    What you'll want to do is basically borrow what we have done for P2P with the Serial_processCommand and P2P_PUSH_PAYLOAD, using g_ui8SerialBuffer to structure your card emulation data and format it properly and then respond to the reader when that is set. But you will also need to make sure you are sending Wait Time Extensions during the processing to get your data setup. You probably only need one big one to handle all that but I don't know the exact speed it would take.

    I don't remember the nitty gritty details of the application layer to give a more detailed description, we haven't modified it in over three years because it's just a TI demonstration and all customers make their own app layer.