PSoC4 : LIN sample project is not working properly

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

cross mob
MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Hi,

We are considering the PSOC4 LIN component.

Software : PSoC Creator 4.2

DVK : CY8CKIT-044 & CY8CKIT-026

CY8CKIT-044

https://www.cypress.com/documentation/development-kitsboards/cy8ckit-044-psoc-4-m-series-pioneer-kit

CY8CKIT-026

https://www.cypress.com/documentation/development-kitsboards/cy8ckit-026-can-and-lin-shield-kit

Project : LIN_Slave_CY8CKIT-044.cywrk ( Install CY8CKIT-026 Kit Only)

1. Open project of LIN_Slave_CY8CKIT-044

2. Build error occurs in the project as it is. Therefore, after upgrading the component, the build is completed normally.

3. Program thet project into a demo kit.

4. Connect the jumper wires and other hardware properly.

5. The following is not working properly.The LED does not light up even when a command is sent.

Master sends ID: 0x10

pastedImage_2.png

Master sends ID: 0x10 and ID: 0x11

pastedImage_0.png

The received response is not normal.

Desired value: ID:0x11、D1:0x22、D2:0xBB、D3:0xFF...

Current value: D3:D1:0x80、D2:0x00、D3:0xFF ...

The LED remains off.

I'm not sure about the problem even with the debugger.
It looks like the data isn't coming to the LIN slave component, but can you figure out what's going on?

Regards,

0 Likes
1 Solution
Ashish
Moderator
Moderator
Moderator
25 likes received 50 solutions authored 100 replies posted

Hi ,

It works perfectly fine for me (I tried the project you attached). Please see my screenshot.lin_snap.PNG

So definitely software is okay. Following things could be checked from you:

1) Ensure that PSoC is okay! (Try any other simple code like blinking led, and see if works). I assume there should be no issue, but it won't take much time to recheck!

2) In the jumper setting of CY8C-026 kit, don't put any jumper on J20. Provide both power supply, from USB to PSoC, and from 12v DC adapter to the CY8C-026 kit.

3) The baudrate is 19200 bps, and checksum is enhanced. Check in your LIN- Analyser if this is properly configured. [ If there is option to set NAD, the intial NAD is 0x01 (verify from the project).]

4) You can check the LIN-Bus voltage (it should be around 12V).

5) If nothing works, there may be chance that the LIN transceiver is affected. Fortunately there are two LIN transceiver on the CY8C-026 KIT, so you may try to use the 2nd one.(Change the connections accordingly!).

Let me know your feedback.

Best Regards,

Ashish

View solution in original post

7 Replies
Ashish
Moderator
Moderator
Moderator
25 likes received 50 solutions authored 100 replies posted

Hi,

Can you please attach you project file without any modification? Also, please provide the jumper settings and connections that you've done on CY8CKIT-026 ? (By the way did you check if NSLP pin is high or not?).

Thanks,

Ashish

0 Likes
lock attach
Attachments are accessible only for community members.
MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Ashish-san,

The project and pin settings are as follows

Use PSoC Creator 4.2 and attach the project that was successfully builded.

pastedImage_2.png

The hardware connection is as shown in the image of CE96999.

CE96999

https://www.cypress.com/documentation/code-examples/ce96999-basic-lin-slave-implementation-psoc-4?so...

We confirm again for NSLP.
Please tell us if there are any other points that need to be confirmed. ..

Regards,

Masashi

0 Likes
Ashish
Moderator
Moderator
Moderator
25 likes received 50 solutions authored 100 replies posted

Hi ,

It works perfectly fine for me (I tried the project you attached). Please see my screenshot.lin_snap.PNG

So definitely software is okay. Following things could be checked from you:

1) Ensure that PSoC is okay! (Try any other simple code like blinking led, and see if works). I assume there should be no issue, but it won't take much time to recheck!

2) In the jumper setting of CY8C-026 kit, don't put any jumper on J20. Provide both power supply, from USB to PSoC, and from 12v DC adapter to the CY8C-026 kit.

3) The baudrate is 19200 bps, and checksum is enhanced. Check in your LIN- Analyser if this is properly configured. [ If there is option to set NAD, the intial NAD is 0x01 (verify from the project).]

4) You can check the LIN-Bus voltage (it should be around 12V).

5) If nothing works, there may be chance that the LIN transceiver is affected. Fortunately there are two LIN transceiver on the CY8C-026 KIT, so you may try to use the 2nd one.(Change the connections accordingly!).

Let me know your feedback.

Best Regards,

Ashish

MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Ashish-san,

Thank you for confirmation.

Please tell me one point about your image.

Although the frame ID is set to "0x10" in the attached project.,Why is your image "ID 0x50"?

pastedImage_0.png

Regards,

Masashi

0 Likes
MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Ashish-san,

After checking the following you told me, the problem was resolved.

3) The baudrate is 19200 bps, and checksum is enhanced. Check in your LIN- Analyser if this is properly configured. [ If there is option to set NAD, the intial NAD is 0x01 (verify from the project).]

The LIN analyzer settings are standard checksums,

It worked normally by using the enhanced checksum.

I am grateful for you appropriate support.

Regards,

Masashi

0 Likes
Ashish
Moderator
Moderator
Moderator
25 likes received 50 solutions authored 100 replies posted

Hi,

I am glad that your issue was resolved. Regarding your question on why the ID was 50 and not 10 in  my screenshot, it because my analyser shows the PID (protected identifier) instead of ID for sending frames but for receiving frame it shows ID (it may specific to my analyzer settings, so you may safely ignore this!) . PID for 0x10 is 0x50.

Thanks,

Ashish

0 Likes
MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Ashish-san,

I understood that it is a LIN analyzer setting.
The LIN analyzer has different GUI depending on the type,
Many of the items to be set have not been confirmed.

I was able to solve the problem immediately.
I appreciate your advice.

Regards,

Masashi

0 Likes