Hi TI Experts,
Please let me confirm the host controller firmware for RF430CL331H.
[Question]
The system (It is used the RF430CL331H) will send the data less than the data size which PCD requested. How should do the host MCU of RF430CL331H?
According to the sample code as below(red line), it seems that host mcu will write the actually send data size to the NDEF_BLOCK_LENGTH register. Is my understanding correct? Is there any other required handling in this case?
******************************
case FILE_REQUEST_STATUS:
{
uint16_t buffer_start;
uint16_t file_offset;
uint16_t file_length;
buffer_start = Read_Register(NDEF_BUFFER_START); // where to start writing the file info in the RF430 buffer (0-2999)
file_offset = Read_Register(NDEF_FILE_OFFSET); // what part of the file to start sending
file_length = Read_Register(NDEF_FILE_LENGTH); // how much of the file starting at offset to send
// we can send more than requested, called caching
// as long as we write back into the length register how
// much we sent it
interrupt_serviced |= DATA_TRANSACTION_INT_FLAG; // clear this flag later
// can have bounds check for the requested length
file_length = SendDataOnFile(SelectedFile, buffer_start, file_offset, file_length);
Write_Register(NDEF_FILE_LENGTH, file_length); // how much was actually written
Write_Register(INT_FLAG_REG, interrupt_serviced); // ACK the flags to clear
Write_Register(HOST_RESPONSE, INT_SERVICED_FIELD); // indicate that we have serviced the request
break;
}
******************************
If you have any questions, please let me know.
Best regards.
Kaka