Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
tony
Level 2
Level 2
First solution authored First like received 5 questions asked

(1)The first question is that when the UART component is configured in standard mode, the break is set to 11 bytes in length. The first interrupt is detected after power-on, the break segment flag is set to 1, but the received data is the synchronization segment 0x55.What could be the cause of this? 

(2)How to correctly configure UART to LIN sub-mode ?

0 Likes
4 Replies
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @tony 

Could you please let us know if you are using the UART component in PSoC 4 for implementing the LIN protocol?

In that case I would recommend you to directly use the LIN Slave component that is already provided for the PSoC 4 component: 

Ekta_0-1625138241839.png

The LIN component is implemented over the UART SCB component and will automatically take care of the break.

Could you please let us know if there is ant specific reason for using the UART component?

Thanks and Regards

Ekta

tony
Level 2
Level 2
First solution authored First like received 5 questions asked

Thank you for your reply!

The reason for using the UART component comes from the requirements of the project. The current interrupt source request is set to RX No empty and Break segment detection. When receiving the break segment, sometimes the break interrupt flag bit of the SCB0_INTR_RX register is not set to 1, but the frame_error flag bit is 1.

Excuse me, what is the reason?

0 Likes
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @tony 

Could you please attach you project? This will help us to identify what might be causing this issue in a better way. 

Also could you please confirm if you have checked break detect interrupt in UART Advanced tab of the UART configuration:

Ekta_0-1625224916467.png

Thanks and Regards

Ekta

 

0 Likes
tony
Level 2
Level 2
First solution authored First like received 5 questions asked

Thank you for your reply!

Because of some project requirements, I cannot provide a complete project file. Here, I attach the UART module configuration picture and the picture of the program flow chart file.

When the BREAK_DETECT flag is set to 1, the data I received is 0xFF. When the FRAME_ERROR flag is set to 1, the data I received is 0x00.

图片1.png图片2.png图片3.pngProgram flow chart .png

0 Likes