Renesas P9412 Manual page 31

Hide thumbs Also See for P9412:
Table of Contents

Advertisement

P9412 Evaluation Board Manual
The Proprietary Packet follows the WPC specification for its form. The FW does not check the content of the
packet, so the AP may load any header and data, including the capability to simulate packets already defined by
WPC for a special function. The AP's needed actions to send a Proprietary Packet are described below:
1. Load the Proprietary Packet in the registers specified in TRX Header Register (PropPkt Send),
TRX_Header_Out (0x50) and TRX Data Value 2~5 Reg. (PropPkt Send), TRX_Data_Value2_5_Out (0x52,
0x53, 0x54, 0x55), header first, followed by the packet data. The header and packet data follow WPC spec.
The checksum is not needed – the FW will calculate it;
2. Set System Command register (0x4E [0]) to start the send process;
3. Check the Pending Pkts register (0x149 [0]) to indicate process completion;
Steps needed to be executed by the AP when Proprietary Packet is received:
1. Receive System interrupt, Data Received_INT (0x37 [9]);
2. Read the byte in the TRX Header Register (0x58). This is the proprietary packet header. Decode the packet
header;
3. Read the two bytes from the TRX Data Value 1~2 registers (0x59 and 0x5A) to complete the packet.
Alternatively, in step2, the AP may read all three bytes and execute step 3 only if needed;
4. Clear the Data Received_INT interrupt. This step is needed even if the interrupt is not enabled and the
packet received event was recognized by polling the System Status register (0x34). No new packet will be
accepted otherwise.
The Communication Message is transferred by a series of packets generated and handled by the FW state
machine. The payload data is loaded/read to/from the communication data buffer, 2K bytes long. The steps
needed to be executed by the AP to send a Communication message are similar to these in the Proprietary
Packet:
1. Verify the Com Channel is not in use (Com Channel Status Register: receive busy 0x148 [1] and send busy
0x148 [0] are cleared);
2. Load the message in the ADT Data Buffer (0x0800);
3. The Com Channel Send Size Register (0x140) must be written with the size of the message in bytes (1 to
2K);
4. Set System Command register, SEND_ADT (0x4F [1]) to start the send process;
5. Wait for the ADT_Sent Interrupt (0x37 [0]) to indicate process completion and clear the interrupt. If there is a
communication error, an ADT_Error_interrupt (0x36 [0]) will be set. ADT error codes can be read at the ADT
Error Code register (0x14D [4;0])
Steps needed to be executed by the AP when Com Message is received:
1. Receive ADT Received interrupt (0x37 [1]);
2. Read the Com Channel Received Size register (0x144) to find the message size;
3. Read the message size number of bytes from the ADT Data buffer registers (0x0800);
4. Clear the ADT_Received interrupt;
The AP may monitor the data transfer progress by checking periodically index registers: Com Channel Send
Index register (0x142) and the Com Channel Receive Index register (0x146) and verify the indexes are
changing. The AP may also implement a Time Out function. It is possible the required time to send a message is
Rev.1.7
Jul.8.20
Page 31

Advertisement

Table of Contents
loading

Table of Contents