Hello,
I'm working with a PE-HMI1 board and I'm trying to get UART working. I want to use rs232 connection between the board and my pc.
I have the following configuration:
- RTOS: ThreadX
- One thread with sf_uart_comms framework (channel 5, asynchronous mode enabled, RXI TXI TEI and ERI with priority 6)
- 232 switch activated on the board
- I have connected the rs232 wires to GND, A (Rx) and Y (Tx)
with this configuration, I've generated the project and put this code in my main thread entry:
void main_thread_entry(void)
{
ssp_err_t ReturnVal;
uint8_t Message[] = "Hello World!\n\r";
ReturnVal = g_sf_comms0.p_api->open(g_sf_comms0.p_ctrl, g_sf_comms0.p_cfg);
g_ioport.p_api->pinWrite(IOPORT_PORT_05_PIN_08, IOPORT_LEVEL_HIGH);
g_ioport.p_api->pinWrite(IOPORT_PORT_05_PIN_09, IOPORT_LEVEL_HIGH);
g_ioport.p_api->pinWrite(IOPORT_PORT_05_PIN_10, IOPORT_LEVEL_HIGH);
/* TODO: add your own code here */
while (1)
{
tx_thread_sleep (1);
ReturnVal = g_sf_comms0.p_api->write(g_sf_comms0.p_ctrl, Message, sizeof(Message), TX_WAIT_FOREVER);
}
}
But I don't manage to read anything through the terminal (the project is built without errors).
Do you have any idea what I'm doing wrong?
Thanks,
Itxaso