SPC560D UART
Hello,
I have some problems understanding and using the UART HAL component. The test application for the SPC560D sends ''Hello World'' with the chnWriteTimout() function. To send the value 0x55, I wrotechnWriteTimeout(&SD1, (uint8_t *)
0x55
, 2, TIME_INFINITE);But this did not work. I doesn´t matter which value I tried to send, I am always receiving a different value. Only when I am sending characters, the received data equals the sended data. What is wrong with my command?
My second question is: is it possible to write my own UART driver? The driver from the library is too complex for my application. I just want to periodically send data triggered by a timer interrupt and to work with the UART interrupt if I receive data. Therefore, I started to write my own driver. So I deactivated SERIAL in the configuration, but I am not able to configure LinFlex. Setting LinFlex to initialization mode by settingLINFLEX_0.
LINCR1
.
B
.
INIT
= 1;did not work. What would be the correct steps to be able to configure the LinFlex component?
Best regards,
Patrik