Hello everybody,
I am trying to setup a serial communication (SCI) and see the outcome on the terminal, unfortunately I have not been successful. I have two messages but I only see the one from the printf. I have tried with SCI1, 2,3 and 4 without any change. Here is my code:
#include <stdio.h> #include "HL_sys_common.h" #include "HL_sci.h" /* USER CODE BEGIN (1) */ /* USER CODE END */ /** @fn void main(void) * @brief Application main function * @note This function is empty by default. * * This function is called after startup. * The user can use this function to implement the application. */ /* USER CODE BEGIN (2) */ #define SCI_PORT sciREG2 /* USER CODE END */ void main(void) { /* USER CODE BEGIN (3) */ uint32_t delay = 0; sciInit(); while(1) { sciSend(SCI_PORT, 15, "Putty Terminal\n"); printf("CCS Terminal\n"); for (delay = 0; delay < 5000; delay++); } /* USER CODE END */ }
I forgot to say, I configured Halogen to use Baudrate of 9600 and Putty uses that baudrate, too. The same with parity bits, stop bits, etc.
Thank you in advance and kind regards,
JG