Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

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

PSoC™ 4 Forum Discussions

Anonymous
Not applicable

Hello,

I use a CY84247AZI-M485 for a LIN-Master application.

So I have some questions:

How can I set the LIN-Break Signal Lenght to 13 Bits?

How can I send a  Break Signal?

How can I evaluate the Break Signal? if (LIN_INTR_RX_BREAK_DETECT) ... ?

// UART Name = LIN

CY_ISR(LINRxIsr)

{

    uint8 rxStatus,errorStatus;        

    uint8 rxData;      

   

    if (LIN_GetInterruptCause()==LIN_INTR_CAUSE_RX) {

          if (LIN_INTR_RX_BREAK_DETECT) {

         

          }

     }

int main(void)

{

     LIN_SetCustomInterruptHandler(LINRxIsr);

     CyGlobalIntEnable; // Enable global interrupts.

}

Regards,

Michael

0 Likes
1 Solution
ShanmathiN_06
Employee
Employee
25 likes received 10 likes received First like received

Hi Michael,

1) In case you are using UDB,

You can set the LIN break length in Advanced tab of UART component configuration window.

You can use API UART_SendBreak(uint8 retMode) to send break condition.

You can use API UART_ReadRxStatus() to check if break was detected.

2) In case you are using SCB,

You can use API SCB_UartSendBreakBlocking(uint32 breakWidth) to send the break condition and width can also be set here (parameter passed).

In advanced tab of component configuration, you can enable "break detect" interrupt.

Thanks,
Shanmathi

View solution in original post

0 Likes
3 Replies
ShanmathiN_06
Employee
Employee
25 likes received 10 likes received First like received

Hi Michael,

1) In case you are using UDB,

You can set the LIN break length in Advanced tab of UART component configuration window.

You can use API UART_SendBreak(uint8 retMode) to send break condition.

You can use API UART_ReadRxStatus() to check if break was detected.

2) In case you are using SCB,

You can use API SCB_UartSendBreakBlocking(uint32 breakWidth) to send the break condition and width can also be set here (parameter passed).

In advanced tab of component configuration, you can enable "break detect" interrupt.

Thanks,
Shanmathi

0 Likes
Anonymous
Not applicable

HI Shanmathi,

thx for your answer, I try it but without success.

I use the SCB Unit for UART, Name of the UART is "LIN".

1. There is no Break IRQ option in Advanced (see Picture)

2. I have no SCB_UartSendBreakBlocking(uint32 breakWidth) or LIN_UartSendBreakBlocking(uint32 breakWidth) API

Regards,

Michael

settings.JPG

0 Likes

Hi Michael,

It looks like you are using old SCB component.

Could you please check using SCB V4.0?

You can also refer to page 143 and 159 of http://www.cypress.com/file/408071/download

Thanks,
Shanmathi

0 Likes