Hello, I am writing a CAN to RS232 convertor using the PEAK example code as a base. Is the serial write function (SER_Write) a blocking function, or does it use interrupts to proceed with the program execution between each character transmission?
Also, is the CAN recieve code interrupt driven?
PCAN-RS-232 Serial and CAN Interrupts
-
- Hardware Development
- Posts: 87
- Joined: Fri 10. Sep 2010, 13:11
Re: PCAN-RS-232 Serial and CAN Interrupts
Hello,
the both, CAN and UART functions, are interrupt driven and maintain an internal software FIFO. The buffers / sizes of the FIFOs is set in the according initialization functions (SER_UserInit () / CAN_UserInit()). Note that SER_Write() might fail with error SER_ERR_TX_SPACE if there is not enough space left in TX FIFO for the number of bytes that should be transmitted.
Best Regards,
Stephan
the both, CAN and UART functions, are interrupt driven and maintain an internal software FIFO. The buffers / sizes of the FIFOs is set in the according initialization functions (SER_UserInit () / CAN_UserInit()). Note that SER_Write() might fail with error SER_ERR_TX_SPACE if there is not enough space left in TX FIFO for the number of bytes that should be transmitted.
Best Regards,
Stephan