Thank you Robin and Erich.
I've made as adviced Robin, by Help on component. But, I'm sorry, i woluld like send binary word, for example write 11110111, and get from MOSI 11110111, not characters. Becuse in my task eighth bit must be parity bit. I already tried use parity bit set in Component Inspector/SPI0/Atribute Set List, but KE02 doesen't support SPI pairty bit.
Could you advice me how should I change the subroutine for ability writing binary word not ASCII characters
#define BLOCK_SIZE 4
uint8_t OutData[BLOCK_SIZE] = "FF";
uint8_t InpData[BLOCK_SIZE];
volatile LDD_SPIMASTER_TError ComError = 0U;
LDD_TError Error;
LDD_TDeviceData *MySPIPtr;
int main(void)
{
PE_low_level_init();
MySPIPtr = SM1_Init(NULL); /* Initialization of SM1 component */
while(1){
Error = SM1_ReceiveBlock(MySPIPtr, InpData, BLOCK_SIZE); /* Request data block reception */
Error = SM1_SendBlock(MySPIPtr, OutData, BLOCK_SIZE); /* Start transmission/reception */
while (!SM1_GetBlockReceivedStatus(MySPIPtr)) { /* Wait until data block is transmitted/received */
SM1_Main(MySPIPtr);
}
}
#ifdef PEX_RTOS_START
PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */
#endif
for(;;){}
}