PCAN-RS-232 Serial and CAN Interrupts

Programmable Converter for RS-232 to CAN
Post Reply
G.Foster
Posts: 1
Joined: Wed 19. Dec 2018, 11:03

PCAN-RS-232 Serial and CAN Interrupts

Post by G.Foster » Wed 19. Dec 2018, 11:54

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?

S.Michaelsen
Hardware Development
Hardware Development
Posts: 87
Joined: Fri 10. Sep 2010, 13:11

Re: PCAN-RS-232 Serial and CAN Interrupts

Post by S.Michaelsen » Thu 20. Dec 2018, 07:19

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

Post Reply